[vtkusers] error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
Jon Haitz Legarreta
jhlegarreta at vicomtech.org
Sun May 5 18:03:13 EDT 2013
Hi,
looks like your linker is unable to find the VTK symbols defined in the
external libraries. You may want to make sure whether the libraries to link
with are really known to your project. If you are not using CMake to build
your project, you are highly advised to do so. It will help you enormously
in avoiding this kind of issues.
You may want to have a look at the examples in the VTK
wiki<http://www.vtk.org/Wiki/VTK/Examples>.
Or you may want to dig in earlier posts, such as this
one<http://vtk.1045678.n5.nabble.com/error-LNK2019-unresolved-external-symbol-quot-public-class-vtkCamera-thiscall-vtkRenderer-GetActiveC-td1239473.html>,
to see whether your problem has been previously asked and hopefully solved.
HTH.
Kind regards,
JON HAITZ
On 5 May 2013 22:27, Maryam979 <maryam_136 at yahoo.com> wrote:
> Hi every one
>
> I have some problems in running vtk code.
>
>
> 1>Linking...
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: void
> __thiscall vtkRenderer::AddActor(class vtkProp *)"
> (?AddActor at vtkRenderer@@QAEXPAVvtkProp@@@Z) referenced in function
> _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: void
> __thiscall vtkRenderWindowInteractor::SetRenderWindow(class vtkRenderWindow
> *)" (?SetRenderWindow at vtkRenderWindowInteractor@@QAEXPAVvtkRenderWindow@
> @@Z)
> referenced in function _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: static
> class vtkRenderWindowInteractor * __cdecl
> vtkRenderWindowInteractor::New(void)"
> (?New at vtkRenderWindowInteractor@@SAPAV1 at XZ) referenced in function
> _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: static
> class vtkRenderWindow * __cdecl vtkRenderWindow::New(void)"
> (?New at vtkRenderWindow@@SAPAV1 at XZ) referenced in function _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: static
> class vtkRenderer * __cdecl vtkRenderer::New(void)"
> (?New at vtkRenderer@@SAPAV1 at XZ) referenced in function _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: static
> class vtkActor * __cdecl vtkActor::New(void)" (?New at vtkActor@@SAPAV1 at XZ)
> referenced in function _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: void
> __thiscall vtkPolyDataMapper::SetInput(class vtkPolyData *)"
> (?SetInput at vtkPolyDataMapper@@QAEXPAVvtkPolyData@@@Z) referenced in
> function
> _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: class
> vtkPolyData * __thiscall vtkPolyDataAlgorithm::GetOutput(void)"
> (?GetOutput at vtkPolyDataAlgorithm@@QAEPAVvtkPolyData@@XZ) referenced in
> function _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: static
> class vtkPolyDataMapper * __cdecl vtkPolyDataMapper::New(void)"
> (?New at vtkPolyDataMapper@@SAPAV1 at XZ) referenced in function _WinMain at 16
> 1>alaki.obj : error LNK2019: unresolved external symbol "public: static
> class vtkSphereSource * __cdecl vtkSphereSource::New(void)"
> (?New at vtkSphereSource@@SAPAV1 at XZ) referenced in function _WinMain at 16
> 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main
> referenced in function ___tmainCRTStartup
> 1>C:\Users\REZA\Documents\Visual Studio 2008\Projects\alaki\Debug\alaki.exe
> : fatal error LNK1120: 11 unresolved externals
> 1>Build log was saved at "file://c:\Users\REZA\Documents\Visual Studio
> 2008\Projects\alaki\alaki\Debug\BuildLog.htm"
> 1>alaki - 12 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
>
>
>
> Can anyone help me to fix the link errors I'm getting .
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/error-LNK2019-unresolved-external-symbol-main-referenced-in-function-tmainCRTStartup-tp5720569.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130506/625fef7a/attachment.htm>
More information about the vtkusers
mailing list