RE: 'Additional compiler support for qpl'd Qt4/win32' - add on :-)
Michael Druing <[email protected]> Thu, 20 Oct 2005 15:48:59 +0200
| Newsgroups | gmane.comp.kde.devel.cygwin |
|---|---|
| Message-ID | <[email protected]> |
Hi, actually, if Qt compiles cleanly, you should be able to start the MSVC .NET command prompt (it's under Start->Visual Studio .NET->Tools or similar) and then issue an "nmake" in the directory where the example code resides (after setting QT_DIR and QMAKESPEC of course) to build that example. If you want to build using the IDE, it's a bit more difficult, i.e. you have to add custim build steps for the moc phase, and also make sure that you're using the correct runtime in your project settings (should be "Multithreaded-DLL" or "Multithreaded Debug DLL"), otherwise you'll either get linker errors or strange runtime crashes. Oh, and the linker should also have QtMain.lib, QtCore.lib etc. as additional dependencies. These options (runtime lib and additional libraries) are in the project options, right click your project in the project explorer and select "Linker/Input" or "Linker/Code generation" from the list on the left. Hope that helps, --Michael > -----Original Message----- > From: Majig El Idrissi [mailto:[email protected]] > Sent: Thursday, October 20, 2005 3:37 PM > To: [email protected] > Subject: Re: 'Additional compiler support for qpl'd > Qt4/win32' - add on :-) > > > > 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#declari ng-qt-libraries > > > > > I can use VCNET. From now, I'm using VC 7.1 > I performed compilation and so on. And what I should do in > order to use Qt ? > > > PS : I'm a newbie about developpement with Microsoft tools > (I'm a linux > user), that's explains my simple questions (I used already Qt > under Linux). > > > _______________________________________________ > kde-cygwin mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/kde-cygwin >