[vtkusers] vtkQt linking errors
David Thompson
scoop_thompson at yahoo.ca
Wed May 26 11:25:08 EDT 2004
Hi,
I'm trying to run some of the examples included in the vtkQt package by
Matthias Koenig on Windows using Visual C++ 6, and I am having trouble
linking them. I have created a static library out of vtkQt, and I am using
qmake to create a Visual C++ project.
Here is my qmake setup for the Cone.cxx example:
SOURCES = Cone.cxx
CONFIG += qt thread opengl debug
DEFINES += QT_DLL
INCLUDEPATH += .. $(VTKDIR)/Graphics $(VTKDIR)/Imaging $(VTKDIR)/Common
$(VTKDIR)/Patented $(VTKDIR)/Rendering $(VTKDIR)/Filtering $(VTKDIR)
TMAKE_LIBS
+= -L.. -lvtkqt -L$(VTKBIN) -lvtkGraphics -lvtkImaging -lvtkCommon -lvtkRend
ering -lvtkFiltering
TMAKE_LFLAGS += /nodefaultlib:"msvcrt" /nodefaultlib:"libc"
TARGET = Cone
Here are the errors I get when compiling with Visual C++ 6:
--------------------Configuration: Cone - Win32 Debug--------------------
Linking...
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class
std::basic_ostream<char,struct std::char_traits<char> > & __thiscall
std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)"
(??6?$basic_ostream at DU?$char_traits at D@std@@@std
@@QAEAAV01 at H@Z) already defined in vtkqt.lib(vtkQtRenderWindow.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "class
std::basic_ostream<char,struct std::char_traits<char> > & __cdecl
std::operator<<(class std::basic_ostream<char,struct std::char_traits<char>
> &,char const *)" (??6std@@YAAAV?$basic_ostream at DU?$cha
r_traits at D@std@@@0 at AAV10@PBD at Z) already defined in
vtkqt.lib(vtkQtRenderWindow.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::locale::~locale(void)" (??1locale at std@@QAE at XZ) already defined in
vtkqt.lib(vtkQtRenderWindow.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: void __thiscall
std::basic_ios<char,struct std::char_traits<char> >::clear(int,bool)"
(?clear@?$basic_ios at DU?$char_traits at D@std@@@std@@QAEXH_N at Z) already defined
in vtkqt.lib(vtkQtRenderWindow.obj
)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_strin
g at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ) already defined in
vtkqt.lib(vtkQtRenderWindow.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::_Lockit::~_Lockit(void)" (??1_Lockit at std@@QAE at XZ) already defined in
vtkqt.lib(vtkQtRenderWindow.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::_Lockit::_Lockit(void)" (??0_Lockit at std@@QAE at XZ) already defined in
vtkqt.lib(vtkQtRenderWindow.obj)
libcp.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet
const * __thiscall std::locale::_Getfacet(unsigned int,bool)const "
(?_Getfacet at locale@std@@QBEPBVfacet at 12@I_N at Z) already defined in
msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: bool __thiscall
std::locale::_Iscloc(void)const " (?_Iscloc at locale@std@@QBE_NXZ) already
defined in msvcprtd.lib(MSVCP60D.dll)
libcp.lib(locale0.obj) : error LNK2005: "private: static class
std::locale::_Locimp * __cdecl std::locale::_Init(void)"
(?_Init at locale@std@@CAPAV_Locimp at 12@XZ) already defined in
msvcprtd.lib(MSVCP60D.dll)
Debug/Cone.exe : fatal error LNK1169: one or more multiply defined symbols
found
Error executing link.exe.
Cone.exe - 11 error(s), 0 warning(s)
Does anybody have any idea what might be causing this, and how I can fix it?
Thanks,
David Thompson
More information about the vtkusers
mailing list