[vtkusers] MingW with VTK?

Vincent Nicolas vnic at gmx.fr
Tue Mar 21 13:36:42 EST 2006


Hi,

 From your command line, it seems you didn't link with the vtk
libraries. You have the flags for the library path, but not for linking
with. There should be arguments like '-lvtkCommon -lvtkGraphics
-lvtkRendering' (...etc).

>g++.exe teste.o  -o "Project3.exe" -L"E:/Dev-Cpp/lib" -L"C:/CMake/bin" 
-L"C:/CMake/lib" -L"E:/Lib/VTK_C" -L"E:/Lib/VTK_C/bin"

By the way, Dev-Cpp is no longer maintained, I suggest you to have a
look at Code::Blocks which is also free and can work with MinGW and
other compilers on Windows and Linux.

Regards,

Vincent NICOLAS
-----------------------------------------
Communications and Remote Sensing Lab.
Universite catholique de Louvain
vincent.nicolas at tele.ucl.ac.be
+32 (0)10 478555
http://www.tele.ucl.ac.be



Dário Oliveira wrote:
> Hi everyone,
> I´m trying to use VTK with an opensource editor (Dev-C++) which 
> compiler is MingW. And I have a big problem because it seems that 
> MingW rename the files in a way that VTK doesn't support and I can't 
> compile my example because of that.
> Do you know if there is any solution available at this moment? I would 
> be really thankful with any help.
> btw, I use VTK 5.0, Dev-C++ and MingW in the lasts versions. And my OS 
> is windows XP, my processor is an AMD64, just in case.
>
> I copy here the compiler log.
>
> thanks a lot in advance.
>
> []s
> Dário Oliveira
>
> ##########################################################################################################
> <file:///E:/jogos/projeto%20final/narciso/ProjetoGraduacao/N%E3o%20ajacentes/>g++.exe 
> teste.o  -o "Project3.exe" -L"E:/Dev-Cpp/lib" -L"C:/CMake/bin" 
> -L"C:/CMake/lib" -L"E:/Lib/VTK_C" -L"E:/Lib/VTK_C/bin" 
>
> teste.o(.text+0x12b):teste.cpp : undefined reference to 
> `_imp___ZN11vtkRenderer3NewEv'
>
> teste.o(.text+0x135):teste.cpp: undefined reference to 
> `_imp___ZN15vtkRenderWindow3NewEv'
> teste.o(.text+0x15b):teste.cpp: undefined reference to 
> `_imp___ZN25vtkRenderWindowInteractor3NewEv'
>
> teste.o(.text+0x172):teste.cpp: undefined reference to 
> `_imp___ZN25vtkRenderWindowInteractor15SetRenderWindowEP15vtkRenderWindow'
> teste.o(.text+0x179):teste.cpp: undefined reference to 
> `_imp___ZN17vtkVolume16Reader3NewEv'
>
> teste.o(.text+0x1d3):teste.cpp: undefined reference to 
> `_imp___ZN17vtkVolume16Reader30SetDataByteOrderToLittleEndianEv'
> teste.o(.text+0x22a):teste.cpp: undefined reference to 
> `_imp___ZN16vtkContourFilter3NewEv'
> teste.o(.text+0x277):teste.cpp: undefined reference to 
> `_imp___ZN18vtkPolyDataNormals3NewEv'
> teste.o(.text+0x2c6):teste.cpp: undefined reference to 
> `_imp___ZN17vtkPolyDataMapper3NewEv'
>
> teste.o(.text+0x30b):teste.cpp : undefined reference to 
> `_imp___ZN8vtkActor3NewEv'
> teste.o(.text+0x331):teste.cpp: undefined reference to 
> `_imp___ZN16vtkOutlineFilter3NewEv'
> teste.o(.text+0x361):teste.cpp: undefined reference to 
> `_imp___ZN17vtkPolyDataMapper3NewEv'
> teste.o(.text+0x391):teste.cpp: undefined reference to 
> `_imp___ZN8vtkActor3NewEv'
> teste.o(.text+0x3bd):teste.cpp: undefined reference to 
> `_imp___ZN8vtkActor11GetPropertyEv'
> teste.o(.text+0x3d9):teste.cpp: undefined reference to 
> `_imp___ZN11vtkProperty8SetColorEddd'
> teste.o(.text+0x3e0):teste.cpp: undefined reference to 
> `_imp___ZN9vtkCamera3NewEv'
> teste.o(.text+0x406):teste.cpp: undefined reference to 
> `_imp___ZN9vtkCamera9SetViewUpEddd'
> teste.o(.text+0x425):teste.cpp: undefined reference to 
> `_imp___ZN9vtkCamera11SetPositionEddd'
> teste.o(.text+0x444):teste.cpp: undefined reference to 
> `_imp___ZN9vtkCamera13SetFocalPointEddd'
> teste.o(.text+0x451):teste.cpp: undefined reference to 
> `_imp___ZN9vtkCamera22ComputeViewPlaneNormalEv'
> teste.o(.text+0x465): teste.cpp: undefined reference to 
> `_imp___ZN11vtkRenderer8AddActorEP7vtkProp'
> teste.o(.text+0x479):teste.cpp: undefined reference to 
> `_imp___ZN11vtkRenderer8AddActorEP7vtkProp'
> teste.o(.text+0x48d):teste.cpp: undefined reference to 
> `_imp___ZN11vtkRenderer15SetActiveCameraEP9vtkCamera'
> teste.o(.text+0x49a):teste.cpp: undefined reference to 
> `_imp___ZN11vtkRenderer11ResetCameraEv'
> teste.o(.text+0x4b1):teste.cpp: undefined reference to 
> `_imp___ZN9vtkCamera5DollyEd'
> teste.o(.text+0x507):teste.cpp: undefined reference to 
> `_imp___ZN11vtkRenderer24ResetCameraClippingRangeEv'
> teste.o(.text$_ZN16vtkContourFilter8SetValueEid[vtkContourFilter::SetValue(int, 
> double)]+0x1e):teste.cpp: undefined reference to 
> `_imp___ZN16vtkContourValues8SetValueEid'
> teste.o(.text$_ZN12vtkAlgorithm13GetOutputPortEv[vtkAlgorithm::GetOutputPort()]+0x15): 
> teste.cpp: undefined reference to 
> `_imp___ZN12vtkAlgorithm13GetOutputPortEi'
> collect2: ld returned 1 exit status
>
> make.exe: *** [Project3.exe] Error 1
> ############################################################################################################ 
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   





More information about the vtkusers mailing list