Page 1 of 2 12 LastLast
Results 1 to 20 of 36

Thread: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

  1. #1
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    4
    Thanked 4 Times in 2 Posts

    Exclamation HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Hello everyone,

    i was trying to get Qwt running properly on my Windows7 64bit PC. After hours of trying to find the right way to do this i wrote a step by step install and test manual.
    I would appreciate a comment of Uwe if this is the right way to do it, especially on the systems path and user variables.
    @Uwe: I also hope this guide saves you some time explaining people how to install qwt.

    Lets start:
    1. Download and install QT 5.0.1 (MinGw) to: "C:\Qt\Qt5.0.1"
    2. Download and extract Qwt 6.1 RC3 to: "C:\qwt-6.1-rc3"
    3. Add "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin" to your systems path variable (qmake.exe is located here)
    4. Add "C:\Qt\Qt5.0.1\Tools\MinGW\bin" to your systems path variable (mingw32-make.exe is located here)
    5. Open a command line (cmd) and navigate to: "C:\qwt-6.1-rc3"
    6. Type: "qmake" (This command won't prompt any msg so don't worry)
    7. Type: "mingw32-make" (Compiles the whole project with examples; this will take a while so be patient)
    8. Type: "mingw32-make install" (This installs qwt to the directory set in "C:\qwt-6.1-rc3\qwtconfig.pri"; the default location is "C:/Qwt-$$QWT_VERSION-rc3" -> "C:\Qwt-6.1.0-rc3\")
    9. Add "C:\Qwt-6.1.0-rc3\lib" to your systems path variable
    10. Add a User variable named "QT_PLUGIN_PATH" with the following path "C:\Qwt-6.1.0-rc3\plugins"
    11. Add a User variable named "QMAKEFEATURES" with the following path "C:\Qwt-6.1.0-rc3\features"
    12. Start Qt Creator
    13. Create a new project: File -> New File or Project ... -> Applications -> Qt Gui Application -> Choose
    14. Name it "Test"
    15. Create the project in the following directory: "C:\workspace"
    16. Open file "Test.pro"
    17. Add "Config += qwt" at the bottom
    18. Open the main.c of the project and delete all its content.
    19. Paste the following in the main.c (This is the qwt example "simpleplot"):
    Qt Code:
    1. #include <qapplication.h>
    2. #include <qwt_plot.h>
    3. #include <qwt_plot_curve.h>
    4. #include <qwt_plot_grid.h>
    5. #include <qwt_symbol.h>
    6. #include <qwt_legend.h>
    7.  
    8. int main( int argc, char **argv )
    9. {
    10. QApplication a( argc, argv );
    11.  
    12. QwtPlot plot;
    13. plot.setTitle( "Plot Demo" );
    14. plot.setCanvasBackground( Qt::white );
    15. plot.setAxisScale( QwtPlot::yLeft, 0.0, 10.0 );
    16. plot.insertLegend( new QwtLegend() );
    17.  
    18. QwtPlotGrid *grid = new QwtPlotGrid();
    19. grid->attach( &plot );
    20.  
    21. QwtPlotCurve *curve = new QwtPlotCurve();
    22. curve->setTitle( "Some Points" );
    23. curve->setPen( Qt::blue, 4 ),
    24. curve->setRenderHint( QwtPlotItem::RenderAntialiased, true );
    25.  
    26. QwtSymbol *symbol = new QwtSymbol( QwtSymbol::Ellipse,
    27. QBrush( Qt::yellow ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
    28. curve->setSymbol( symbol );
    29.  
    30. QPolygonF points;
    31. points << QPointF( 0.0, 4.4 ) << QPointF( 1.0, 3.0 )
    32. << QPointF( 2.0, 4.5 ) << QPointF( 3.0, 6.8 )
    33. << QPointF( 4.0, 7.9 ) << QPointF( 5.0, 7.1 );
    34. curve->setSamples( points );
    35.  
    36. curve->attach( &plot );
    37.  
    38. plot.resize( 600, 400 );
    39. plot.show();
    40.  
    41. return a.exec();
    42. }
    To copy to clipboard, switch view to plain text mode 
    20. Rightclick the project and select "run qmake..."
    21. Now run the project. It should compile without errors and run.

    Remember this:
    For your own projects you now only have to add "Config += qwt" to your *.pro file to get Qwt running.

    I hope this tutorial helps to do your first steps with QT + Qwt.



    ---

    If this tutorial works and some admin is fine with it, i would suggest to mark it as a sticky thread.

  2. The following 3 users say thank you to M4chin3 for this useful post:

    maharnab91 (28th March 2013), rawfool (21st March 2013), tarjeik (10th April 2013)

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    It is one of the best howtos I have read here so far - even if it shows only one way to install Qwt.

    Of course some of these steps are for mingw only and have to be different when using another make tool. Also one important ( even if optional ) step is missing between 2 - 3: editing qwtconfig.pri.

    Uwe

  4. #3
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    4
    Thanked 4 Times in 2 Posts

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Quote Originally Posted by Uwe View Post
    It is one of the best howtos I have read here so far - even if it shows only one way to install Qwt.

    Of course some of these steps are for mingw only and have to be different when using another make tool. Also one important ( even if optional ) step is missing between 2 - 3: editing qwtconfig.pri.

    Uwe
    Yes you are right, the tutorial shows only one way to install Qwt: Qt and Qwt for Windows with MinGW and all of this in the default configuration. For other configurations or toolchains the user has to edit the "qwtconfig.pri" and the depending path variables. But i didn't want to explain all the details of the installation process, i wanted to give the user like a "quick-start" tutorial. Also it doesn't show how to get the Qwt Desginer plugin to run.

    What do you think about marking this thread as sticky?

  5. The following user says thank you to M4chin3 for this useful post:

    swamyonline (20th March 2013)

  6. #4
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    10
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Sure, this will save hours of efforts of new users of Qwt, particularly under Windows platform. Yes, as Mr. Uwe pointed out, editing "qwtconfig.pri" file step (for examples at least) would make it a complete how to file. Thanks.

    swamy.

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Quote Originally Posted by M4chin3 View Post
    What do you think about marking this thread as sticky?
    I prefer to have step by step install guidelines in the Qwt documentation. In fact this is something I wanted to do myself - but at the moment I'm too busy to work on Qwt.

    The idea is to have on install page for each platform/compiler combination. If you want to volunteer for your combination please send me a patch with your howto as doxygen code. When you have time please write a second howto for how to the same in the creator.

    Uwe

  8. #6
    Join Date
    Apr 2013
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Thank you so much M4Chin3
    I spent so much time figuring out how things works regarding QWT,
    (my Windows version is Vista 32bits)

    I have added
    "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin"
    "C:\Qt\Qt5.0.1\Tools\MinGW\bin"
    to user path variable by mistake
    then gone through 5 6 7 8 steps

    then i noticed my mistake

    and added 3 and 4 to system path variable and gone through steps 5 6 7 8 again and completed all the steps


    when running at the end compiling process stopped on the #Includes of header files like qwt_plot.h
    stating as error report no such file or directory

    i added manually the needed Headers to the projects just to go through it but headers refer to other headers and problem is not solve

    is it because of the user variable paths ?
    what would you recommend to do

    Thanks

    --
    Hamza

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    When using an official Qt package you will find a an entry "Command Prompt" in the Qt application menu ( Start->All Programs->Qt .. ) where the environment is already set for you. Restart with a clean package, change into the Qwt directory ( the top directory, where you find qwt.pro ) and enter 3 simple commands:

    Qt Code:
    1. qmake qwt.pro
    2. mingw32-make
    3. mingw32-make install
    To copy to clipboard, switch view to plain text mode 
    Impossible to fail ...

    Uwe

  10. #8
    Join Date
    Apr 2013
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Hi Uwe,


    I am very thankful to your prompt help,
    indeed i used windows standard cmd and not Qt cmd

    by clean package you meant unzip qwt again somewhere else under C root ?
    I am still waiting for mingw32-make and crossing fingers


    --
    Hamza


    Added after 26 minutes:


    Hi again,

    it failed with me,
    it seems Qt creator is not recognizing the headers,
    maybe i am missing something here,

    Please look at the screenshot i attached and let me know if you understood my mistake,
    maybe there are qt configurations missing ?

    Thank you,
    Attached Images Attached Images
    Last edited by QTHamzaYazidBelkhiria; 5th April 2013 at 12:30.

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Quote Originally Posted by QTHamzaYazidBelkhiria View Post
    it failed with me,
    it seems Qt creator is not recognizing the headers
    This is a completely different question and can probably be solved by 11 + 17. It would help trying to understand the very, very basics of what you want to do.

    Uwe

  12. #10
    Join Date
    Apr 2013
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Thank you again and Sorry
    i am just starting and feel really stupid about my questions,

    attached are screenshots of step 11 and step 17

    i am not sure if step 11 is just about that window only,

    i found this link too but i am not sure either it is my case or not
    http://qt-project.org/doc/qt-5.0/qtd...ation-features

    What should i do from here ?

    thanks,

    --
    Hamza
    Attached Images Attached Images

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    It has to be "CONFIG += qwt".

    The most promising way is trying to understand instead of following postings somewhere from users that also didn't try to understand following postings ...

    Uwe

  14. #12
    Join Date
    Apr 2013
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Dear Uwe,


    Thank you for your precise support,
    it is very kind of you!
    and it is working indeed, other examples too (but i can't access the UIs of examples) !

    Can i ask more about qwt or should it be in another post, or may i have your contacts ?

    Thank you again,

    --
    Hamza,

  15. #13
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    4
    Thanked 4 Times in 2 Posts

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Right, it has to be "CONFIG += qwt" instead of "Config += qwt"

    Sorry for that typo, i would change it but i can't the post seems to be too old.

  16. #14
    Join Date
    May 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    I'm using visual studio 2008, Qt 4.8.4, and Qwt 6.0.3.

    I've successfully added the Qwt designer plugin to the Qt Designer (instructions here: http://geekanddo.wordpress.com/2012/...on-windows-10/) and can add Qwt widgets in Qt designer.

    Now my problem is the Qwt examples won't compile:

    cd examples
    qmake examples.pri
    nmake

    ends with:

    linking bin\examples.exe
    LINK : warning LNK4001: no object files specified; libraries used
    LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
    LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
    bin\examples.exe : fatal error LNK1120: 1 unresolved externals
    NMAKE : fatal error U1077: 'echo' : return code '0x460'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    This seems odd since Qwt compiled without issues. Suggestions?
    Last edited by dts350z; 5th May 2013 at 23:08.

  17. #15
    Join Date
    May 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    OK I got it going by opening the examples.pro file from the Qt menu in Visual Studio, and building there.

  18. #16
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    4
    Thanked 4 Times in 2 Posts

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Quote Originally Posted by dts350z View Post
    OK I got it going by opening the examples.pro file from the Qt menu in Visual Studio, and building there.
    I'm glad this way worked for you. But i don't think it's the 100% right way.
    The Steps 9. and 10. of my tutorial should cover the file copys mentioned by the "geekanddo" page and should get the plugin running.

    If you've done this the plugin is listed in the Qt Creator IDE: Navigate to the "Design" view, then "Extras -> Formeditor -> Plugins...". (I got the german version so i hope the labels are named like this) The QWT plugin should be listed here but i got the following message:
    "The plugin 'C:/Qt/Qwt-6.1.0-rc3/plugins/designer/qwt_designer_plugin.dll' uses an incompatible QT_Library. (In Debug-Mode created and in Release-Mode created Libraries can't be used together") (Also translated from be from the german version, i'm not sure if the error message is 100% like this in english)

    The Error message tells that the QWT plugin is compiled in Debug mode and the QT Creator IDE is compiled in Release mode and therefore they won't work together. I fully agree on this statement. The only problem is: I compiled QWT in Debug&Release mode and i think it should work this way but obviously it doesn't :-/. I will have a look on this today maybe.


    p.s. I'm using Qt 5.0.2 right now, not Qt 4.8.4

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Quote Originally Posted by M4chin3 View Post
    I will have a look on this today maybe.
    The only reason why Qwt 6.1 is not released yet is, that I'm working on the install documentation - unfortunately I don't find much time at the moment and I'm pretty slow here.

    Instead of spending any time on posting in the forum - please check out SVN trunk and send me patches for install.dox ( doxygen needs to be installed ). It is not necessary to write the whole document - patches for single chapters are fine as well.

    The same request for contribution goes to anyone reading here !

    Uwe

  20. #18
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    4
    Thanked 4 Times in 2 Posts

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Hi Uwe,

    i thought about writing a doxygen patch for the installation under Windows. But a documentation without a running creator plugin wouldn't be that good. It would create more questions than answers.

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

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    In doc/install.dox ( SVN trunk ) you find the skeleton for a new document with the intention to cover all what is necessary to build, install and use Qwt. It already has an incomplete chapter about how to use the Qwt designer plugin.

    Feel free to extend or correct this document with any information you like - as long as it is correct. Even if you think you need to have more chapters: go ahead !

    Uwe

  22. #20
    Join Date
    May 2013
    Posts
    13
    Thanks
    4

    Default Re: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    OK I 've been trying to use qwt 6.1.0 rc3 with Qt 5.0.2 built for msvc 10.

    [...]

    Edit: Ok it would seem I 'm able to add the library with the qt creator wizard thingy and it works. Is that ok or should I be aiming for CONFIG += qwt ? (I don't really care about the designer plugin).
    Last edited by Durkin; 9th May 2013 at 19:24.

Similar Threads

  1. Replies: 1
    Last Post: 14th November 2012, 19:20
  2. Replies: 0
    Last Post: 26th February 2012, 16:10
  3. Building 64bit Shared Qt Dlls on 64bit Win7 for Visual Studio
    By HarrySatt in forum Installation and Deployment
    Replies: 1
    Last Post: 29th November 2011, 05:39
  4. Replies: 0
    Last Post: 3rd October 2011, 14:36
  5. Win7 64bit remote debugging
    By mekl in forum Qt Programming
    Replies: 0
    Last Post: 20th June 2010, 21:20

Tags for this Thread

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.