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-&gt;Options-&gt;Projects and Solutions-&gt;VC++ Directories-&gt;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-&gt;Linker-&gt;General-&gt;Additional Library Directories as C:\Program Files\VTK\lib\debug<br>- set Configuration Properties-&gt;Linker-&gt;Input-&gt;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-&gt;Linker-&gt;General-&gt;Additional Library Directories as C:\Program Files\VTK\lib\release<br>
- set Configuration Properties-&gt;Linker-&gt;Input-&gt;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> &lt;<a href="mailto:mam06bhv@studserv.uni-leipzig.de">mam06bhv@studserv.uni-leipzig.de</a>&gt; 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>&gt; Hi Markus!<br>&gt;<br>&gt; On 11/1/06, mam06bhv &lt;<a href="mailto:mam06bhv@studserv.uni-leipzig.de">mam06bhv@studserv.uni-leipzig.de</a>&gt; wrote:<br>&gt;&gt; I've solved the problem but now I got these errors in the VTK-window
<br>&gt;<br>&gt; Just for the record, what was the solution?&nbsp;&nbsp;It might be helpful to<br>&gt; others who search the mailing list and find themselves having a<br>&gt; similar problem.<br>&gt;<br>&gt;&gt; ERROR: In ..\..\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 824
<br>&gt;&gt; vtkWin32OpenGLRenderWindow (01970FD0): wglCreateContext failed in<br>&gt;&gt; CreateAWindow(), error: 1114<br>&gt;&gt;<br>&gt;&gt; ERROR: In ..\..\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 824<br>&gt;&gt; vtkWin32OpenGLRenderWindow (01970FD0): wglCreateContext failed in
<br>&gt;&gt; CreateAWindow(), error: 0<br>&gt;&gt;<br>&gt;&gt; ERROR: In ..\..\VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 824<br>&gt;&gt; vtkWin32OpenGLRenderWindow (01970FD0): wglCreateContext failed in<br>&gt;&gt; CreateAWindow(), error: 6
<br>&gt;<br>&gt; I did a quick search in the mailing list archives for similar error<br>&gt; messages and found a reply from Mathieu Malaterre:<br>&gt; <a href="http://public.kitware.com/pipermail/vtkusers/2004-January/071401.html">
http://public.kitware.com/pipermail/vtkusers/2004-January/071401.html</a><br>&gt;<br>&gt; Some other postings did not have replies or solutions, but it seems<br>&gt; that the problem is related to OpenGL drivers/libraries rather than
<br>&gt; VTK.&nbsp;&nbsp;One suggestion for narrowing down the problem is to run other<br>&gt; OpenGL applications and see if they work.&nbsp;&nbsp;For example, start by<br>&gt; building VTK with &quot;BUILD_EXAMPLES&quot; set to &quot;ON&quot; and run one of the
<br>&gt; examples, like &quot;Cone&quot;.&nbsp;&nbsp;If it does not work, try other, non-VTK<br>&gt; programs that use OpenGL, and if they do not work either, it is very<br>&gt; likely a problem with your graphics card/OpenGL driver.
<br>&gt;<br>&gt; I also agree with Prename that you should consider using CMake for<br>&gt; creating your VisualStudio project.&nbsp;&nbsp;After seeing the same problems<br>&gt; reportet on the mailing like multiple times, I do not think that this
<br>&gt; will make a difference--but the important point is that it is much<br>&gt; easier to understand the steps involved in building your project and<br>&gt; to eliminate some possibilities that might be a result of an
<br>&gt; unconventional build setup.<br>&gt;<br>&gt; Here is a sample &quot;CMakeLists.txt&quot; file that should be sufficient for<br>&gt; creating a VS8 Solution for your sample program (I called it<br>&gt; &quot;markus-test.cc
&quot;) using CMake:<br>&gt;<br>&gt; [this is actually a stripped-down version of<br>&gt; &quot;Examples/Medical/Cxx/CMakeLists.txt&quot;]<br>&gt; ----BEGIN----<br>&gt; PROJECT (markus-test)<br>&gt;<br>&gt; FIND_PACKAGE(VTK REQUIRED)
<br>&gt; IF(NOT VTK_USE_RENDERING)<br>&gt;&nbsp;&nbsp;MESSAGE(FATAL_ERROR &quot;Example ${PROJECT_NAME} requires VTK_USE_RENDERING.&quot;)<br>&gt; ENDIF(NOT VTK_USE_RENDERING)<br>&gt; INCLUDE(${VTK_USE_FILE})<br>&gt;<br>&gt; ADD_EXECUTABLE(markus-test 
markus-test.cc)<br>&gt;<br>&gt; TARGET_LINK_LIBRARIES(markus-test vtkRendering)<br>&gt; ----END----<br>&gt;<br>&gt; Just put this and &quot;markus-test.cc&quot; into the same directory, create a<br>&gt; build directory somewhere and use 
CMakeSetup.exe to create a VS8<br>&gt; Solution file.&nbsp;&nbsp;In the interactive configuratio process, you will need<br>&gt; to specify the location of the directory &quot;.../lib/vtk-&lt;version&gt;&quot; from<br>&gt; your VTK installation.
<br>&gt;<br>&gt;<br>&gt; Regards<br>&gt;<br>&gt; 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>