Results 1 to 5 of 5

Thread: qwt and visual studio 2005

  1. #1
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qwt and visual studio 2005

    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?
    Last edited by stefan; 16th September 2008 at 13:28.

  2. #2
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwt and visual studio 2005

    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:
    Qt Code:
    1. configure -platform win32-msvc2005 -static -debug-and-release -fast -qt-sql-sqlite -no-qt3support -vcproj
    To copy to clipboard, switch view to plain text mode 

    what am i doing wrong?
    Last edited by jacek; 28th September 2008 at 20:16. Reason: changed [code] to [quote]

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwt and visual studio 2005

    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.

  4. #4
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwt and visual studio 2005

    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?
    Last edited by stefan; 29th September 2008 at 13:40.

  5. #5
    Join Date
    Aug 2008
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt and visual studio 2005

    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>

  6. The following user says thank you to WXNSNW for this useful post:

    stefan (7th October 2008)

Similar Threads

  1. Replies: 5
    Last Post: 30th March 2007, 18:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.