[vtkusers] new project creation
John Drescher
drescherjm at gmail.com
Mon Jun 30 14:39:28 EDT 2014
On Mon, Jun 30, 2014 at 2:35 PM, Mina Haratian <mina.hrtn at gmail.com> wrote:
> Hi,
>
> I have installed and compiled the vtk 6.1 on vc++ 2008, and I can run the
> examples. I want to create a new project and read and write MHD raw files.
> When I tried to compile the program. I got unresolved external symbol error.
> Could you please help be solve this problem?
>
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: void __thiscall vtkRenderer::AddActor(class
> vtkProp *)" (__imp_?AddActor at vtkRenderer@@QAEXPAVvtkProp@@@Z) referenced in
> function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: void __thiscall
> vtkRenderWindowInteractor::SetRenderWindow(class vtkRenderWindow *)"
> (__imp_?SetRenderWindow at vtkRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z)
> referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class vtkRenderWindowInteractor *
> __cdecl vtkRenderWindowInteractor::New(void)"
> (__imp_?New at vtkRenderWindowInteractor@@SAPAV1 at XZ) referenced in function
> _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class vtkRenderWindow * __cdecl
> vtkRenderWindow::New(void)" (__imp_?New at vtkRenderWindow@@SAPAV1 at XZ)
> referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class vtkRenderer * __cdecl
> vtkRenderer::New(void)" (__imp_?New at vtkRenderer@@SAPAV1 at XZ) referenced in
> function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class vtkActor * __cdecl
> vtkActor::New(void)" (__imp_?New at vtkActor@@SAPAV1 at XZ) referenced in function
> _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: void __thiscall
> vtkPolyDataMapper::SetInputData(class vtkPolyData *)"
> (__imp_?SetInputData at vtkPolyDataMapper@@QAEXPAVvtkPolyData@@@Z) referenced
> in function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: class vtkPolyData * __thiscall
> vtkPolyDataAlgorithm::GetOutput(void)"
> (__imp_?GetOutput at vtkPolyDataAlgorithm@@QAEPAVvtkPolyData@@XZ) referenced in
> function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class vtkPolyDataMapper * __cdecl
> vtkPolyDataMapper::New(void)" (__imp_?New at vtkPolyDataMapper@@SAPAV1 at XZ)
> referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static class vtkSphereSource * __cdecl
> vtkSphereSource::New(void)" (__imp_?New at vtkSphereSource@@SAPAV1 at XZ)
> referenced in function _main
> 1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol
> _WinMain at 16 referenced in function ___tmainCRTStartup
>
Make your program a console application.
Add WIN32 to your add_executable() in your CMakeLists.txt for your application.
John
More information about the vtkusers
mailing list