[vtkusers] Error when linking VTK with visual studio 2008

Gishara Indeewarie gish.777 at gmail.com
Wed Jan 25 02:40:46 EST 2012


I linked all the libs, but it did not work. I solved the issue by linking
dll files as well. Thanks.

2012/1/25 Dženan Zukić <dzenanz at gmail.com>

> You did not link all the required libraries. When creating a project using
> CMake, the list of required libraries is automatically determined. When
> using plain VS, you need to manually define the libraries, such as
> vtkCommon.lib, vtkHybrid.lib, etc
>
> On Wed, Jan 25, 2012 at 03:52, Gishara Indeewarie <gish.777 at gmail.com>wrote:
>
>>
>> Hi  Dženan ,
>>
>> Thanks for the repply. I build the project vtk_minimal in visual studio
>> 2008, not in cmake. Do you have any idea for these errors?
>>
>>
>> 2012/1/24 Dženan Zukić <dzenanz at gmail.com>
>>
>>> How does CMakeLists.txt look like for this project vtk_minimal?
>>>
>>> On Tue, Jan 24, 2012 at 11:44, Gishara Indeewarie <gish.777 at gmail.com>wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have downloaded the vtk source and built it using cmake according to
>>>> the following tutorial.
>>>>
>>>>
>>>> http://vtkblog.blogspot.com/2007/04/install-build-vtk-from-source-in-visual.html
>>>>
>>>>
>>>> And set the environment variables and project properties for additional
>>>> dependencies as well.
>>>>  But when I try to build a simple project (which you can get from the
>>>> above link), I am getting the following errors.
>>>>
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkInteractorStyleTrackballCamera * __cdecl
>>>> vtkInteractorStyleTrackballCamera::New(void)"
>>>> (?New at vtkInteractorStyleTrackballCamera@@SAPAV1 at XZ) referenced in
>>>> function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> void __thiscall vtkRenderWindowInteractor::SetRenderWindow(class
>>>> vtkRenderWindow *)" (?SetRenderWindow at vtkRenderWindowInteractor
>>>> @@QAEXPAVvtkRenderWindow@@@Z) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkRenderWindowInteractor * __cdecl
>>>> vtkRenderWindowInteractor::New(void)" (?New at vtkRenderWindowInteractor
>>>> @@SAPAV1 at XZ) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkRenderWindow * __cdecl vtkRenderWindow::New(void)"
>>>> (?New at vtkRenderWindow@@SAPAV1 at XZ) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> void __thiscall vtkRenderer::AddActor(class vtkProp *)"
>>>> (?AddActor at vtkRenderer@@QAEXPAVvtkProp@@@Z) referenced in function
>>>> _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkRenderer * __cdecl vtkRenderer::New(void)" (?New at vtkRenderer
>>>> @@SAPAV1 at XZ) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkActor * __cdecl vtkActor::New(void)" (?New at vtkActor
>>>> @@SAPAV1 at XZ) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkPolyDataMapper * __cdecl vtkPolyDataMapper::New(void)"
>>>> (?New at vtkPolyDataMapper@@SAPAV1 at XZ) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> static class vtkConeSource * __cdecl vtkConeSource::New(void)"
>>>> (?New at vtkConeSource@@SAPAV1 at XZ) referenced in function _main
>>>> 1>vtk_minimal.obj : error LNK2019: unresolved external symbol "public:
>>>> class vtkAlgorithmOutput * __thiscall vtkAlgorithm::GetOutputPort(int)"
>>>> (?GetOutputPort at vtkAlgorithm@@QAEPAVvtkAlgorithmOutput@@H at Z)
>>>> referenced in function "public: class vtkAlgorithmOutput * __thiscall
>>>> vtkAlgorithm::GetOutputPort(void)" (?GetOutputPort at vtkAlgorithm
>>>> @@QAEPAVvtkAlgorithmOutput@@XZ)
>>>> 1>Debug/../bin/vtk_minimal_d.exe : fatal error LNK1120: 10 unresolved
>>>> externals
>>>>
>>>> Please help me.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>>
>>>
>>
>>
>> --
>> Gish
>>
>>
>>
>> --
>> Gish
>>
>
>


-- 
Gish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120125/c0fd6b8c/attachment.htm>


More information about the vtkusers mailing list