[vtkusers] VTKQt + VC++6

Amir M. Tahmasebi tahmaseb at cs.queensu.ca
Sun Sep 19 20:32:53 EDT 2004


Hi,
I'm trying to run some of the examples (i.e. cone) included in the vtkQt package by
Matthias Koenig on Windows and for some reason I have to use Visual C++ 6 (cannot switch to VC .Net), and I am having trouble
linking them. 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

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 -lvtkRendering -lvtkFiltering

TARGET = Cone

Here are the errors I get when compiling with Visual C++ 6:
Compiling...
Cone.cxx
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\istream(547) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
C:\Qt\vtkqt\examples\Cone.cxx(44) : warning C4508: 'main' : function should return a value; 'void' return type assumed
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ostream(234) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ostream(229) : while compiling class-template member function 'class std::basic_ostream<char,struct std::char_traits<char> > &__thiscall std::basic_ostream<char,struct std::char_traits<ch
ar> >::put(char)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ostream(234) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ostream(229) : while compiling class-template member function 'class std::basic_ostream<unsigned short,struct std::char_traits<unsigned short> > &__thiscall std::basic_ostream<unsigned sh
ort,struct std::char_traits<unsigned short> >::put(unsigned short)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\istream(46) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\istream(41) : while compiling class-template member function 'bool __thiscall std::basic_istream<char,struct std::char_traits<char> >::ipfx(bool)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\istream(46) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\istream(41) : while compiling class-template member function 'bool __thiscall std::basic_istream<unsigned short,struct std::char_traits<unsigned short> >::ipfx(bool)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(525) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(521) : while compiling class-template member function 'void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Copy(unsigned int)'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(525) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xstring(521) : while compiling class-template member function 'void __thiscall std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short
> >::_Copy(unsigned int)'
Linking...
vtkqt.lib(vtkQtRenderWindow.obj) : warning LNK4044: unrecognized option "alternatename:__imp_??$?6U?$char_traits at D@std@@@std@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@0 at AAV10@PBD at Z=__imp_??6std@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@0 at AAV
10 at PBD@Z"; ignored
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
vtkqt.lib(vtkQtRenderWindow.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) ??$?6U?$char_traits at D@std@@@std@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@0 at AAV10@PBD at Z" (__imp_??$?6U?$char_traits at D@std@@@std@@YAAAV?$basic_ost
ream at DU?$char_traits at D@std@@@0 at AAV10@PBD at Z)
vtkqt.lib(vtkQtRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U at YAPAXI@Z)
vtkqt.lib(vtkQtRenderWindowInteractor.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V at YAXPAX@Z)
Debug/Cone.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

Cone.exe - 4 error(s), 10 warning(s)

Has anybody come across the same problem? any idea what might be causing this and how can I fix it?

Thanks,
Amir 
Medical Computing Lab
School of Computing
Queen's University
Goodwin Hall
Kingston, ON
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040919/f935276b/attachment.htm>


More information about the vtkusers mailing list