[vtkusers] vtkQt linking errors

REGAT-BARREL Aurélien arbvtk at yahoo.fr
Thu May 27 08:29:52 EDT 2004


Hi,
I had some troubles with vtkQt and VTK 4.2 precompiled binaries.
I downloaded vtkQt here :
http://www.matthias-koenig.net/vtkqt/vtk4qt3.tgz
I downloaded and compiled VTK 4.4.
Now it works fine (I use Qt 3.3.2 and VC++ 7.1).
I compiled in Release (you are in Debug).
If you still have troubles, try to change your project "runtime library" setting (=> mono/multithread static/dll).
If it does not work, you should think about upgrading your VC++.
VC++ 6 is very old and outdated !
Download for free VC++ Toolkit 2003 and replace your cl.exe and link.exe + the libs.
http://msdn.microsoft.com/visualc/vctoolkit2003/

David Thompson <scoop_thompson at yahoo.ca> wrote:
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 > & __thiscall
std::basic_ostream >::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 > & __cdecl
std::operator<<(class std::basic_ostream
> &,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 >::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,class
std::allocator >::~basic_stringstd::char_traits,class std::allocator >(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

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: 
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

Aurélien REGAT-BARREL
		
---------------------------------
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040527/4d0d0ed6/attachment.htm>


More information about the vtkusers mailing list