PDA

View Full Version : qwt and visual studio 2005



stefan
16th September 2008, 14:14
Please move this thread to qwt forum
Sorry

hi.
I'm trying to build qwt with visual studio 2005.
first method
start visual studio (Qt integration) -> Qt menu -> Open solution from *.pro file
then Build

second method
Visual Studio 2005 Command Prompt
cd c:\qwt
qmake
nmake

borh mehods fails with bunch of (LINK) warning and errors (3841 warnings and 65 errors - first method). What am i doing wrong?

stefan
18th September 2008, 09:13
can anybody help me?

most of the compile warnings are something like this::

1>c:\qt\qt4.4.1-msvc2005-s\include\qtcore\../../src/corelib/tools/qvector.h(713) : warning C4661: 'QList<T> QList<T>::fromSet(const QSet<T> &)' : no suitable definition provided for explicit template instantiation request
1> with
1> [
1> T=double
1> ]
1> c:\qt\qt4.4.1-msvc2005-s\include\qtcore\../../src/corelib/tools/qlist.h(310) : see declaration of 'QList<T>::fromSet'
1> with
1> [
1> T=double
1> ]
linke warning:

2>qwt_plot.obj : warning LNK4049: locally defined symbol ??1QFont@@QAE@XZ (public: __thiscall QFont::~QFont(void)) imported
link errors:

2>qwt_text_engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QTextFrameFormat::setPadding(double)" (__imp_?setPadding@QTextFrameFormat@@QAEXN@Z) referenced in function "public: __thiscall QwtRichTextDocument::QwtRichTextDocument(class QString const &,int,class QFont const &)" (??0QwtRichTextDocument@@QAE@ABVQString@@HABVQFont @@@Z)
2>..\lib\qwt5.dll : fatal error LNK1120: 10 unresolved externals

i build Qt with following:

configure -platform win32-msvc2005 -static -debug-and-release -fast -qt-sql-sqlite -no-qt3support -vcproj

what am i doing wrong?

jacek
28th September 2008, 21:18
You get those linker errors because you use static Qt and Qwt was linked with Qt dynamically. In other words Qwt can't see Qt code that is linked with your application.

stefan
29th September 2008, 14:33
thanks, now at least i know what's the problem
so, i must build Qt dinamically? can i link qwt statically to Qt lib files? how?

WXNSNW
30th September 2008, 12:25
Hi,

In the qwtconfig.pri, comment out the line CONFIG += QwtDll as #CONFIG += QwtDll. And then compile. Now a static library is created in the lib folder named as qwt. You put a copy of the library and in the Qt's bin folder and in the Qt's lib folder. Then link in your project using LIBS += <path of the lib>