Results 1 to 11 of 11

Thread: Can I use Qwt with Microsoft compiler or not?

  1. #1
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Can I use Qwt with Microsoft compiler or not?

    Hi,

    Can I use Qwt whit Microsoft compiler?

    I use Qt 4.8.5 and Microsoft Visual C++ Compiler 10.0 (x86)

    It requires "qwt.lib". But I don't know how to create "qwt.lib".

    Thank you!

  2. #2
    Join Date
    Nov 2007
    Posts
    55
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can I use Qwt with Microsoft compiler or not?

    yes of course you can.

    I can send you by mail a complete description of the procedure, just drop me your email account name.

    Alain

  3. The following user says thank you to alainstgt for this useful post:

    8Observer8 (5th August 2013)

  4. #3
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: Can I use Qwt with Microsoft compiler or not?


  5. #4
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: Can I use Qwt with Microsoft compiler or not?

    I try to run an example.

    plot.pro
    Qt Code:
    1. SOURCES += \
    2. main.cpp
    3.  
    4. CONFIG += qwt
    5.  
    6. QWT_LOCATION = c:/Qwt-6.1.0
    7. INCLUDEPATH += $${QWT_LOCATION}/include
    8. LIBS = -L$${QWT_LOCATION}/lib \
    9. -lqwtd
    To copy to clipboard, switch view to plain text mode 

    main.cpp
    Qt Code:
    1. #include <QtGui\QApplication>
    2. #include <qwt_plot.h>
    3.  
    4. int main(int argc, char* argv[])
    5. {
    6. // this is a simple plot without any data!
    7. QApplication app(argc,argv);
    8.  
    9. QwtPlot *myPlot = new QwtPlot;
    10. myPlot->setTitle("my first plot");
    11. myPlot->setCanvasBackground(QColor(Qt::darkBlue));
    12. myPlot->show();
    13.  
    14. return app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 

    Output:
    QWidget: Must construct a QApplication before a QPaintDevice
    D:\Documents\Qt\HelloPlot\build-HelloPlot-Microsoft_Visual_C-Debug\debug\HelloPlot.exe exited with code 1
    What should be in qwtconfig.pri? "CONFIG += QwtDll" or "#CONFIG += QwtDll"? or no difference?

    I use:
    - Visual Studio Command Prompt (2010)
    - Qt4.8.5
    - Qwt-6.1.0
    - Compiler: Microsoft Visual C++ Compiler 10.0 (x86)

  6. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Can I use Qwt with Microsoft compiler or not?

    Quote Originally Posted by 8Observer8 View Post
    What should be in qwtconfig.pri? "CONFIG += QwtDll" or "#CONFIG += QwtDll"? or no difference?
    qwtconfig.pri is for building Qwt itself, not for building an application using Qwt.

    Almost everything above shows that you didn't read: http://qwt.sourceforge.net/qwtinstall.html.

    Uwe

  7. #6
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: Can I use Qwt with Microsoft compiler or not?

    I mean when I install Qwt Should I to comment out this line: CONFIG += QwtDll

  8. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Can I use Qwt with Microsoft compiler or not?

    Depends on if you want to build Qwt as a shared or as a static library. See http://en.wikipedia.org/wiki/Library_%28computing%29

    Uwe

  9. The following user says thank you to Uwe for this useful post:

    8Observer8 (5th August 2013)

  10. #8
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: Can I use Qwt with Microsoft compiler or not?

    Why my example doesn't work? I did everything according to the instructions.

  11. #9
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Can I use Qwt with Microsoft compiler or not?

    Remove the lines 6-9 from your plot.pro ( expanding the include path and library list is done by CONFIG += qwt ! ) and recompile from scratch.
    If your code doesn't compile because of not finding Qwt headers you didn't configure qmake properly and "CONFIG += qwt" didn't work, what could be the reason for problem above.

    Uwe

  12. The following user says thank you to Uwe for this useful post:

    8Observer8 (5th August 2013)

  13. #10
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Re: Can I use Qwt with Microsoft compiler or not?

    How to configure qmake properly?

  14. #11
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Can I use Qwt with Microsoft compiler or not?


  15. The following user says thank you to Uwe for this useful post:

    8Observer8 (5th August 2013)

Similar Threads

  1. Replies: 7
    Last Post: 18th April 2013, 22:39
  2. Qt Creator Parse compiler errors of a non gcc compiler
    By kiozen in forum Qt Tools
    Replies: 4
    Last Post: 4th July 2011, 01:34
  3. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 08:33
  4. Replies: 4
    Last Post: 14th January 2011, 23:44
  5. Strange compiler behaviour (compiler passes wrong argument)
    By SasaVilic in forum General Programming
    Replies: 2
    Last Post: 2nd November 2010, 11:36

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.