[vtkusers] Compilation problem using Visual Studio .NET2003 ...

William A. Hoffman billlist at nycap.rr.com
Fri Jul 16 15:40:37 EDT 2004


You may want to look here:

Examples/GUI/Win32/SampleMFC

If you are not that familiar with compiler/linker options,
I would suggest using cmake to generate your MFC project as well.
The above example should show you how to do that.  

-Bill



At 03:24 PM 7/16/2004, Charles Boivin wrote:
>Hello Bill, 
>
>Thank you for taking the time to answer my question. 
>
>I have done as you suggested and downloaded CMake 2.0. "Visual Studio 7
>.NET 2003" was not available in the version of CMake I had before, so
>that really helped things. I was able to go through the whole process of
>CMake and it generated a solution file with all the necessary projects.
>Nice. Compilation went very smoothly, I did not have to add anything
>this time.
>
>However, when I go and try to link the SDI MFC app to the library I
>compiled, I end up with all those linking error messages regarding
>OpenGL. This app was compiling (and running) fine when I was linking to
>the binaries I downloaded from the net. What is even more strange is
>that all the tests run fine, and I do see some small windows appear with
>3D stuff in them so obviously, it is possible to run some things with
>VTK.
>
>I wonder if the fact that I compiled the libraries static has anything
>to do with it? The binaries were DLL libraries. Can't see why that would
>make any difference, however. So I am still puzzled by this one.
>
>Oh, and one more thing.. the binary version of the libraries had a nice
>"include" directory that was generated and all I had to do to compile
>the MFC app was to add it as an include directory. Going through CMake,
>it seems that this does not get generated so I have to fetch the
>different include files in the various folders... I wonder if it's
>possible to get the "include" directory with all the include files in
>them as well?
>
>Thank you for your time... Hopefully someone will have encountered that
>problem before.
>
>Charles Boivin
>
>>>> "William A. Hoffman" <billlist at nycap.rr.com> 07/16/04 09:30am >>>
>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.




More information about the vtkusers mailing list