Re: 'Additional compiler support for qpl'd Qt4/win32' - add on :-)

"Christian Ehrlicher" <[email protected]> Thu, 20 Oct 2005 12:28:33 +0200 (MEST)
Newsgroups gmane.comp.kde.devel.cygwin
Message-ID <[email protected]>
> --- Ursprüngliche Nachricht ---
> Von: "Majig El Idrissi" <[email protected]>
> An: [email protected]
> Betreff: 'Additional compiler support for qpl'd Qt4/win32' - add on :-)
> Datum: Thu, 20 Oct 2005 12:18:50 +0200
> 
>      Hi,
> I follow the readme, set some environnement variables (path to VC98
> includes, lib), and performe the compilation for MSVisual C++.
> 
> There is no error (only some warnings) during compilation.
> 
> But it appears that I don't know how to setting up Visual C in order to
> compile this tutorial : "qt-win-opensource-src-4.0.1\examples\tutorial\t1"
> (I set path for QT header and QT lib, and simply copy the tutorial main
> file).
> 
> Have you a link to a documentation or some advices ?
> 
> Post Mail :
> 
> I have link errors :
> --------------------Configuration: TOTO - Win32 Debug--------------------
> Compiling...
> TOTO.cpp
> Linking...
> TOTO.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) 
> public: virtual __thiscall QApplication::~QApplication(void)" 
> (__imp_??1QApplication@@UAE@XZ)
> TOTO.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) 
> public: virtual __thiscall QPushButton::~QPushButton(void)" 
> (__imp_??1QPushButton@@UAE@XZ)
> 
> and so on
What MSVC - version do you use? You have to add QtCore.lib and at least
QtGui.lib to your linker (I think it's named 'additional dependencies'.
Maybe you have also set the library search path to QTDIR/lib. When you use
Msvc.net and up, qmake can create the project for you -> 'qmake -spec
win32-msvc.net -tp vc'. Msvc6 is currently not supported this way.
For more information see:
http://doc.trolltech.com/4.0/qmake-manual.html
and for the needed libraries esp. this:
http://doc.trolltech.com/4.0/qmake-project-files.html#declaring-qt-libraries


Christian

-- 
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl