[vtkusers] Compilation problem using Visual Studio .NET 2003 ...
William A. Hoffman
billlist at nycap.rr.com
Fri Jul 16 11:30:22 EDT 2004
For Visual Studio .NET 2003, you should select the "Visual Studio 7 .NET 2003"
option in the Build for of CMakeSetup and not Visual Studio 7. You may
also want to try a more recent version of CMake, although 1.6 should work, but you will
have to pick the correct compiler. (cmake 2.0 will default to the compiler you have
installed on the machine.)
One more note, once you have configured a directory with cmake for a particular compiler,
you have to remove the directory if you want to change the compiler.
-Bill
At 11:02 AM 7/16/2004, Charles Boivin wrote:
>Hello everyone,
>
>I am in the process of evaluating VTK for the visualization of results
>from our CFD solver. Last week, I downloaded the binary distribution of
>VTK 4.2 (for Windows) and installed it. I then tried to make one of the
>MFC examples work, and I succeeded after a few changes were made to the
>code. (The example is the SDI MFC application in the examples
>directory).
>
>This week, I have been trying to *compile* VTK from the source code; I
>suspect I will need to do this for our application so I want to get it
>going right away. I have CMake 1.6 and VTK 4.2, both taken from the CDs
>that came with the book (which we have since obtained).
>
>I had a few problems with CMake to start with... It seems that whenever
>I select "Visual Studio 7" as the project type, CMake invariable can't
>find itself! And even if I specify the directory for CMake, the process
>then fails with some compilation error -- it does not generate any of
>the VS 2003 project files.
>
>I had some success selecting "Visual Studio 6" as the project type, and
>then importing those in VS.NET -- they were automatically converted.
>After adding the "VTK_USE_ANSI_STDLIB" define in the project properties,
>I was able to compile the library. I also generated all the test and
>examples, and all the tests were successful. I compiled the library in
>static mode (for now, at least).
>
>I then tried to link the SDI MFC example to the library I had just
>compiled, and ran into some problems:
>I get a lot of linking errors, most of them looking like they are
>caused by perhaps a missing OpenGL library? Here is an example:
>
>....
>vtkRendering.lib(vtkOpenGLFreeTypeTextMapper.obj) : error LNK2019:
>unresolved external symbol __imp__glBitmap at 28 referenced in function
>"public: virtual void __thiscall
>vtkOpenGLFreeTypeTextMapper::RenderOverlay(class vtkViewport *,class
>vtkActor2D *)"
>(?RenderOverlay at vtkOpenGLFreeTypeTextMapper@@UAEXPAVvtkViewport@@PAVvtkActor2D@@@Z)
>vtkftgl.lib(FTBitmapGlyphRenderOpenGL.obj) : error LNK2001: unresolved
>external symbol __imp__glBitmap at 28
>vtkftgl.lib(FTPixmapGlyphRenderOpenGL.obj) : error LNK2001: unresolved
>external symbol __imp__glBitmap at 28
>vtkRendering.lib(vtkOpenGLFreeTypeTextMapper.obj) : error LNK2019:
>unresolved external symbol __imp__glRasterPos2i at 8 referenced in function
>"public: virtual void __thiscall
>vtkOpenGLFreeTypeTextMapper::RenderOverlay(class vtkViewport *,class
>vtkActor2D *)"
>(?RenderOverlay at vtkOpenGLFreeTypeTextMapper@@UAEXPAVvtkViewport@@PAVvtkActor2D@@@Z)
>....
>
>... and so on.
>
>How could I solve this? I know I could go back to the pre-compiled
>binaries for now to make everything work, but I would like to solve this
>problem... It looks like it has to with OpenGL, but I frankly do not
>have a clue as to what I should do at this point.
>
>Any help would be appreciated!
>
>Thank you in advance,
>
>Charles Boivin
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list