[vtkusers] Building VTK application with Visual Studio 2008
Alexandru Duţu
alex.dutu at gmail.com
Fri May 1 07:04:28 EDT 2009
Dear VTK users,
I am using Windows XP SP3 and Visual Studio 2008. I downloaded VTK sources,
branch 5-4-0 from the CVS repository. I built them with Visual Studio 2008
(I generated the build workspaces for Visual Studio with Cmake, set the
BUILD_EXAMPLES option and left unchecked BUILD_SHARED_LIBS options). After
the buid process there was no error or warnings, I installed VTK from Visual
Studio, also no errors or warnings.
I have started another instance of Visual Studio and created a solution and
in that solution an empty console application project.
After that I configured the depencies within Visual Studio:
1. I've added the include directory to the "Addional Include
Directories".
- My include directory is "c:\Program Files\VTK\include\vtk-5.4"
2. I've added the library directory to the "Additional Library
Directories"
- My library directory is "c:\Program Files\VTK\lib\vtk-5.4"
3. I've Included all the VTK libraries (.lib) files I used in your
program under "Additional Dependencies"
- vtkCommon.lib, vtkFiltering.lib, vtkGraphics.lib, vtkRendering.lib,
and vtksys.lib.
4. I've linked to the OpenGL library ("opengl32.lib") also under
"Additional Dependencies".
I've added the Cone.cxx example to my project and build it. Compilation went
ok, at linking I had 31 errors.
It seems that there are unresolved symbols in my linking process
(vtkRendering.lib(vtkProperty.obj) : error LNK2001: unresolved external
symbol "public: class vtkXMLDataElement * __thiscall
vtkXMLMaterial::GetProperty(int)" (?GetProperty at vtkXMLMaterial
@@QAEPAVvtkXMLDataElement@@H at Z))
You can check the attachement for the complete build log.
If I put all the lib files to the linker Additional Dependencies there are
much more linking errors (aprox 300 errors).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090501/b826e0ce/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 6366 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090501/b826e0ce/attachment.obj>
More information about the vtkusers
mailing list