Obada is right, don't give up VTK. It's really a cool stuff.<br>Actually, you CAN use VTK in VC++ .NET 2005 for your own project without CMake.<br>Here's my step in great detail:<br>-------- Build and install VTK, CMake is needed here for only once --------
<br>1. Extract VTK source code to a directory, say, D:\Programming\VTK\vtk-5.0.2\src<br>2. Make another directory for build, say, D:\Programming\VTK\vtk-5.0.2\build<br>3. Run CMake and configure it as shown in the picture attached, press OK
<br>4. Enter the build directory, D:\Programming\VTK\vtk-5.0.2\build, open the solution file VTK.sln<br>5. Set the solution configuration to Debug mode, right click ALL_BUILD, build<br>6. Right click INSTALL, build<br>7. Enter the install directory, for me, it's C:\Program Files\VTK
<br>8. Enter the sub-directory for library, i.e., C:\Program Files\VTK\lib, for now, all the .lib files here are built under Debug, you can use them for Debug in your own project<br>9. So, make a new directory here, say, C:\Program Files\VTK\lib\debug, and move all the .lib files into it
<br>10. Back to VC++, this time, set your solution configuration to Release mode and redo step 5 and 6 <br>11. Enter C:\Program Files\VTK\lib again, now, all the .lib files are built under Release, you can use them for Release in your own project
<br>12. So, make another new directory here, say, C:\Program Files\VTK\lib\release, and move all the .lib files into it<br>13. Installation part is done.<br>--------Configuration for your own project--------<br>1. Configure VC++ INCLUDE path: Tools->Options->Projects and Solutions->VC++ Directories->Include files, add the VTK include directory into the list, for me, it's C:\Program Files\VTK\include
<br>2. Configure your project property:<br>Debug mode:<br>- set Configuration Properties->Linker->General->Additional Library Directories as C:\Program Files\VTK\lib\debug<br>- set Configuration Properties->Linker->Input->Additional Dependencies as all the .lib files you need, well, you can just include all the library files here to make it work for sure
<br>Release mode:<br>- set Configuration Properties->Linker->General->Additional Library Directories as C:\Program Files\VTK\lib\release<br>
- set Configuration Properties->Linker->Input->Additional
Dependencies as all the .lib files you need, again, you can just include
all the library files here to make it work for sure<br>
3. Done.<br><br>Compile and build your projects as you want.<br>Happy programming!<br><br><br><div><span class="gmail_quote">On 11/2/06, <b class="gmail_sendername"><a href="mailto:mam06bhv@studserv.uni-leipzig.de">mam06bhv@studserv.uni-leipzig.de
</a></b> <<a href="mailto:mam06bhv@studserv.uni-leipzig.de">mam06bhv@studserv.uni-leipzig.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Obada Mahdi schrieb:<br>> Hi Markus!<br>><br>> On 11/1/06, mam06bhv <<a href="mailto:mam06bhv@studserv.uni-leipzig.de">mam06bhv@studserv.uni-leipzig.de</a>> wrote:<br>>> I've solved the problem but now I got these errors in the VTK-window
<br>><br>> Just for the record, what was the solution? It might be helpful to<br>> others who search the mailing list and find themselves having a<br>> similar problem.<br>><br>>> ERROR: In ..\..\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 824
<br>>> vtkWin32OpenGLRenderWindow (01970FD0): wglCreateContext failed in<br>>> CreateAWindow(), error: 1114<br>>><br>>> ERROR: In ..\..\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 824<br>>> vtkWin32OpenGLRenderWindow (01970FD0): wglCreateContext failed in
<br>>> CreateAWindow(), error: 0<br>>><br>>> ERROR: In ..\..\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 824<br>>> vtkWin32OpenGLRenderWindow (01970FD0): wglCreateContext failed in<br>>> CreateAWindow(), error: 6
<br>><br>> I did a quick search in the mailing list archives for similar error<br>> messages and found a reply from Mathieu Malaterre:<br>> <a href="http://public.kitware.com/pipermail/vtkusers/2004-January/071401.html">
http://public.kitware.com/pipermail/vtkusers/2004-January/071401.html</a><br>><br>> Some other postings did not have replies or solutions, but it seems<br>> that the problem is related to OpenGL drivers/libraries rather than
<br>> VTK. One suggestion for narrowing down the problem is to run other<br>> OpenGL applications and see if they work. For example, start by<br>> building VTK with "BUILD_EXAMPLES" set to "ON" and run one of the
<br>> examples, like "Cone". If it does not work, try other, non-VTK<br>> programs that use OpenGL, and if they do not work either, it is very<br>> likely a problem with your graphics card/OpenGL driver.
<br>><br>> I also agree with Prename that you should consider using CMake for<br>> creating your VisualStudio project. After seeing the same problems<br>> reportet on the mailing like multiple times, I do not think that this
<br>> will make a difference--but the important point is that it is much<br>> easier to understand the steps involved in building your project and<br>> to eliminate some possibilities that might be a result of an
<br>> unconventional build setup.<br>><br>> Here is a sample "CMakeLists.txt" file that should be sufficient for<br>> creating a VS8 Solution for your sample program (I called it<br>> "markus-test.cc
") using CMake:<br>><br>> [this is actually a stripped-down version of<br>> "Examples/Medical/Cxx/CMakeLists.txt"]<br>> ----BEGIN----<br>> PROJECT (markus-test)<br>><br>> FIND_PACKAGE(VTK REQUIRED)
<br>> IF(NOT VTK_USE_RENDERING)<br>> MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires VTK_USE_RENDERING.")<br>> ENDIF(NOT VTK_USE_RENDERING)<br>> INCLUDE(${VTK_USE_FILE})<br>><br>> ADD_EXECUTABLE(markus-test
markus-test.cc)<br>><br>> TARGET_LINK_LIBRARIES(markus-test vtkRendering)<br>> ----END----<br>><br>> Just put this and "markus-test.cc" into the same directory, create a<br>> build directory somewhere and use
CMakeSetup.exe to create a VS8<br>> Solution file. In the interactive configuratio process, you will need<br>> to specify the location of the directory ".../lib/vtk-<version>" from<br>> your VTK installation.
<br>><br>><br>> Regards<br>><br>> Obada<br>Sorry guys<br>I'm tired to run it again and again. Is somewhere a tutorial or something else<br>where I can go through step by step (downloading what installing where what to
<br>build wehre to copy and everything in detail) and not only telling me the half.<br>in the last 3 days I've installed Cmake and VTK deinstalled everything.<br>installed again and so one and nothing helped.<br>Why should I use CMAKE to complie when I have Visual Studio where I create my
<br>projects? If I can use vtk only with Cmake I know why I've never heard before<br>of it.<br><br><br><br>----------------------------------------------------------------<br>This message was sent using IMP, the Internet Messaging Program.
<br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ
</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>