Results 1 to 20 of 36

Thread: Need help installing Qwt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Need help installing Qwt

    Hi.
    I've just downloaded Qwt and am trying to install it. I'm not very good with this system environment stuff and a friend helped me install Qt, so I have a few questions despite reading the Qwt INSTALL file.
    My system is Windows Vista Home Premium and I'm using Qt Creator with a MinGW toolchain.

    From the Qwt INSTALL file:

    Start a Shell, where Qt4 is initialized. ( F.e. with
    "Programs->Qt by Trolltech ...->Qt 4.x.x Command Prompt" ).
    Check if you can execute "make" or something like "mingw32-make".

    qmake qwt.pro
    make
    make install
    1.) It doesn't mention where to install Qwt. I just unzipped it and copied it into C:\qwt-6.0.1. Is that okay ? Or should I put it in my Qt Projects folder ?

    2.) What does "a shell where Qt4 is initialized" mean ? I suppose it means that the make command is recognized. But when I open Windows Command Prompt, it isn't.
    When I type "make ?", it says it's not recognized as an internal or external command.
    The Program Menu folder "Qt SDK" only has the "MADDE Terminal" shell. But I haven't used this before, whether for installing Qt or otherwise.

    3.) Can I maybe build it directly from the Qt Creator Projects menu instead of using the shell commands, seeing that there are qmake calls in the build steps ?
    I tried just building the project from there. It seems to have compiled, but then when I tried to run it it said the process could not be started.
    Hint: Think carefully before picking a user name.

  2. #2
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    Hello,

    if you have the latest Qt SDK or a "old" Qt framework version (the bundle that contains the Qt Libraries and the Qt Creator/Qt Designer) you should find in programs menu a shortcut called "Qt Command Prompt" that it's exactly what you said: a classic command prompt with some enviroment variables set so you can call qmake and mingw32-make command without specifiy the full path.

    I advise you to move the qwt source directory out of C:\ because this is the default install target, and this may be confusing.

    Open Qt Command Prompt (or just open your command prompt and set PATH='C:\the\path\of\your\qt\bin'), go inside the qwt source and simply launch "qmake", "mingw32-make" and "mingw32-make install" as written on INSTALL file.

    I think that you can build the project directly with Qt Creator, but for installation, I think, you have to manually launch the make install command.

    Hint: you can't "run" the project, since it's a library and not an application. But you can run the examples...

    Marco

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

    Computer Hater (5th October 2011)

  4. #3
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    1. You can build Qwt anywhere you want, just you need later add a path to Qwt include files and libraries in your project.

    2. "a shell where Qt4 is initialized" means a shell where qt environment variables are set. Qt command prompt (from start->all programs->qt sdk by nokia...) is such shell.

    3. You can use QtCreator to buil Qwt.
    The install step copies the binaries to their destination.

    By default QtCreator uses shadow directory to build the project and then copies all *.a and *.dll files to <path to qwt source>/libs (defined by DESTDIR in src.pro)

    To build and run Qwt examples from qwt.pro you need to uncomment line 108 in qwtconfig.pri (or add in qwt.pro QWT_CONFIG += QwtExamples).
    Then all you need to do is to select active configuration to run (any example will do) and run it.

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

    Computer Hater (5th October 2011)

  6. #4
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    Thank you both for your responses !

    I checked again and I now did find a shell in the Qt SDK folder from the Programs menu. It was in the 'Desktop' subfolder and is called 'Qt 4.7.3 for Desktop (MinGW)'. I hope that's the right one.
    It still doesn't find 'make' in that shell, but it does recognize 'qmake', so I figure that's okay.

    I then proceeded to install and it worked mostly fine. But I might have another problem...

    I left the Qwt source files in the 'C:\qwt-6.0.1' because I perhaps misread your remark that it may be 'confusing' to mean that Qwt would create a similarly named folder in C:\ that might confuse *me* later on.
    But now it seems that Qwt tried to install into exactly that same folder. The installation worked mostly fine, but it did show a few errors and tried to copy a few files onto themselves, so I suppose it was a bad idea leaving the source folder there.
    (I tried renaming it prior to installation, but I got file not found errors when I started the install process and so I just went with the original name.)

    Should I uninstall it again and reinstall from a different location ?
    If so, how do I undo this installation ?
    Hint: Think carefully before picking a user name.

  7. #5
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    I checked again and I now did find a shell in the Qt SDK folder from the Programs menu. It was in the 'Desktop' subfolder and is called 'Qt 4.7.3 for Desktop (MinGW)'. I hope that's the right one.
    It still doesn't find 'make' in that shell, but it does recognize 'qmake', so I figure that's okay.
    In your working enviroment (QT/MinGW) you haven't the 'make' command, instead you have the 'mingw32-make': so you have to follow these steps: qmake, mingw32-make and finally mingw32-make install;


    I left the Qwt source files in the 'C:\qwt-6.0.1' because I perhaps misread your remark that it may be 'confusing' to mean that Qwt would create a similarly named folder in C:\ that might confuse *me* later on.
    But now it seems that Qwt tried to install into exactly that same folder. The installation worked mostly fine, but it did show a few errors and tried to copy a few files onto themselves, so I suppose it was a bad idea leaving the source folder there.
    (I tried renaming it prior to installation, but I got file not found errors when I started the install process and so I just went with the original name.)
    As Spitfire said you can place your Qwt source folder where you want, but, in my opinion, it might confuse you later since C:\ is also the installation target.

    Try to change the Qwt sources place (..maybe on desktop?), clean all the past installation tries (AFAIK just delete the C:\Qwt-... directory) and then try to rebuild/install using 'mingw32-make' command.

    At the end of the install procedure, you should find inside the C:\Qwt.. directory the compiled libreries (.a and .dll), the headers, and the QT designer plugin.

    Hope this may helps.


    Ciao,
    Marco
    Last edited by mpita; 5th October 2011 at 16:44.

  8. The following user says thank you to mpita for this useful post:

    Computer Hater (6th October 2011)

  9. #6
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    Quote Originally Posted by mpita View Post
    Try to change the Qwt sources place (..maybe on desktop?), clean all the past installation tries (AFAIK just delete the C:\Qwt-... directory) and then try to rebuild/install using 'mingw32-make' command.
    I did. And it worked ! I didn't see any error messages this time, just a few warnings.

    Quote Originally Posted by mpita View Post
    At the end of the install procedure, you should find inside the C:\Qwt.. directory the compiled libreries (.a and .dll), the headers, and the QT designer plugin.

    Hope this may helps.
    Indeed, the files are there. It sure did help. Thank you so much !

    -----
    A few more questions:

    1.)
    The INSTALL file then says:

    Quote Originally Posted by INSTALL file
    Don't forget to tell qmake where to find qwt.prf:
    qmake -set QMAKEFEATURES ...
    I took this to mean:
    Type qmake -set QMAKEFEATURES qwt.prf
    *after* the installation in *any* folder inside the shell.
    I did that and the shell neither showed any error nor success message, so I guess it worked ?

    2.) About using Qwt...
    I checked the section about adding new features.

    It says I have to add the feature file to the CONFIG environment variable. I currently don't have CONFIG in my environment variables (as listed in Qt Creator's Projects menu). I have CONFIGSETROOT. Is that the one or do I have to add CONFIG separately ?
    Hint: Think carefully before picking a user name.

  10. #7
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    Let's begin from the last question: 'CONFIG' is not an enviroment variable but is one of the most important qmake variable. If you take a look to your project (.pro) file, you'll find a reference to this variable.

    Take a look here http://doc.qt.nokia.com/4.7/qmake-va...reference.html

    For example, with CONFIG, you can set if a library must build statically or dinamically or just tell if you want to see gcc warning messages.

    Let's go on: when you launch the qmake -set QMAKEFEATURES path/qwt.prf, you tell to qmake that a new feature is available and all its information is stored inside the prf file specified. Adding Qwt as feature to your project allow you to enable Qwt just setting 'CONFIG += qwt' to your .pro, without care about paths; you can also add to your project Qwt specifying the qwt path into INCLUDEPATH, LIBS... it's the "dirty way"...!

    If I scared you, maybe it's time to have a "quick" look to qmake world and all its features...!

    http://doc.qt.nokia.com/4.7/qmake-running.html
    Last edited by mpita; 5th October 2011 at 21:02.

  11. The following user says thank you to mpita for this useful post:

    Computer Hater (6th October 2011)

  12. #8
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    I see. I guess I could have seen that from the context in which CONFIG was used in the INSTALL file, but I missed it.

    So, now I entered "qmake -set QMAKEFEATURES <path-to-qwt.prf>" on the command line.
    I still got no feedback message, neither positive nor negative.

    I then added "CONFIG += qwt" to my makefile (which btw didn't have any CONFIG statement before). The project compiled.

    I could not instantly see if any Qwt functionality was available.
    I tried typing "qwt" in my source code in Creator and auto completion suggested "QWT_DLL" and "QWT_MAKEDLL" which I suppose wouldn't have been available before.
    Oddly enough, after re-opening my project this doesn't work anymore.
    Also, when I tried e.g. typing 'include "qwt' or 'include <qwt' at the top of my header files it wouldn't suggest any of the Qwt classes for completion.

    Another thing is that I tried to open one of the Qwt examples and realized they had not been installed in the C:\Qwt-6.0.1\ folder. I still have them in the source folder on my desktop. Can I just move them to a new more convenient location or do I have to do another reinstall from a permanent source location ? (I don't want to leave the folder on my desktop for permanent access.)

    Sorry for being such a piece of work. :-/
    Hint: Think carefully before picking a user name.

  13. #9
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    First of all, I was talking about "project file" (myfantasticqtproject.pro): I supposed that you own a Qt project where you want to place some Qwt stuff; Makefiles are another kind of file that you should not care about.

    Usually you open .pro files with Qt Creator, that runs for you 'qmake' command and produces the Makefiles for debug and release. It's the easiest way to develop with Qt.

    If you installed qwt on its default target (C:\Qwt-6.0.1\), then you need to run 'qmake -set QMAKEFEATURES C:\Qwt-6.0.1\features' just one time and its doesn't show anything on output. Checking that qmake has successfully recognized the features path is possible with command 'qmake -query QMAKEFEATURES'.

    Open your project file with a text editor or with the Qt Creator plain text editor, find the line "QT += .." and add the following line

    CONFIG += qwt


    Finally you're ready to go: try to add to your project a widget that shows a simple QwtPlotCurve.

    Maybe you didn't compile the examples, try to check that inside 'C:\<path of your qwt sources\qwtconfig.pri' the line QWT_CONFIG += QwtExamples is uncommented. If so uncomment that line then rebuild qwt.

    Ciao!
    Marco

  14. The following user says thank you to mpita for this useful post:

    Computer Hater (10th October 2011)

  15. #10
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    Quote Originally Posted by mpita View Post
    First of all, I was talking about "project file" (myfantasticqtproject.pro): I supposed that you own a Qt project where you want to place some Qwt stuff; Makefiles are another kind of file that you should not care about.
    Right. That was a stupid typo on my part. I meant I had edited my project file to include "CONFIG += qwt", not the makefile. And the project file didn't already have a CONFIG line, so I added the first CONFIG statement there.


    Quote Originally Posted by mpita View Post
    If you installed qwt on its default target (C:\Qwt-6.0.1\), then you need to run 'qmake -set QMAKEFEATURES C:\Qwt-6.0.1\features' just one time and its doesn't show anything on output. Checking that qmake has successfully recognized the features path is possible with command 'qmake -query QMAKEFEATURES'.
    Okay, I checked with the query command and it shows the features folder. So that part worked.


    Quote Originally Posted by mpita View Post
    Maybe you didn't compile the examples, try to check that inside 'C:\<path of your qwt sources\qwtconfig.pri' the line QWT_CONFIG += QwtExamples is uncommented. If so uncomment that line then rebuild qwt.
    That line is uncommented. However, inside my "C:\Qwt-6.0.1\" folder there are only the sub-folders "doc", "features", "include", "lib" and "plugins", none of which contains the source code or project files of the examples. Those are still in the source folder on my desktop. Hence my question if that source folder should have been placed somewhere more permanently and stick around as a source for the Qwt example projects. Up until now I had thought the examples would be copied into the installation target along with the rest.
    Some of the other folders and files from the original source location are also missing.

    What would I do ? Copy the examples manually to somewhere else or reinstall from another source location ?


    Quote Originally Posted by mpita View Post
    Finally you're ready to go: try to add to your project a widget that shows a simple QwtPlotCurve.
    The thing is that Qt Creator's source code editor doesn't seem to recognize anything starting with "Qwt" and the design area doesn't offer Qwt widgets.
    I suppose I have to execute the last paragraph from the Qwt INSTALL file first:

    For using the designer plugin you have to configure the Qt designer/creator
    where to look for plugins. This can be done by setting the QT_PLUGIN_PATH or
    using a qt.conf file ( see http://doc.qt.nokia.com/4.7/deployment-plugins.html ).
    Beside the plugin the Qwt library itsself also needs to be known to the Designer/Creator
    ( see LD_LIBRARY_PATH, PATH ... above ).
    The given link says QT_PLUGIN_PATH is an environment variable. In my project's environment variables there wasn't a QT_PLUGIN_PATH variable, so I set it.
    The Projects menu in Creator then specifically said:
    Using System Environment and
    Set QT_PLUGIN_PATH to C:\Qwt-6.0.1\plugins\designer\


    I tried it with and without the \designer sub-folder, but it is still not recognized.

    Now in the Qt Plugin section it says that the Qt version number must not be lower than the plugin version number. My Qt version is 4.7.3. But where do I find the plugin version ?

    Also, it says:

    When building plugins to extend an application, it is important to ensure that the plugin is configured in the same way as the application. This means that if the application was built in release mode, plugins should be built in release mode, too.
    I don't think I have "built" the plugin yet.
    Maybe the problem is still with why the examples are not installed and the rest will fall in line ?
    Hint: Think carefully before picking a user name.

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

    Default Re: Need help installing Qwt

    Quote Originally Posted by Computer Hater View Post
    I don't think I have "built" the plugin yet.
    Maybe the problem is still with why the examples are not installed and the rest will fall in line ?
    The examples are not installed because there is no reason to install them. That is intended - nothing wrong.

    Uwe

  17. #12
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    If you want to use the qwt designer plugin the esiest way is to copy the 'qwt_designer_plugin.dll' file inside 'plugins\designer' of your qt framework. It's not the right way but, it works in 2 seconds (and worked for me). Then via 'About Plugins' inside the Designer's Help menu you should see if the plugin is successfully been loaded.

    If examples are already compiled, their binaries lay on C:\<path of your qwt sources>\examples\bin.

    If your creator doesn't find any qwt header, try to set in yout project file

    INCLUDEPATH += <qwt installation path>/include/

    Then run qmake again. Try to add #include <qwt_curve_plot.h>

    Ciao!

    Marco

Similar Threads

  1. installing qwt
    By szisziszilvi in forum Qwt
    Replies: 14
    Last Post: 9th February 2011, 08:56
  2. installing qt using
    By impeteperry in forum Installation and Deployment
    Replies: 2
    Last Post: 30th December 2009, 15:41
  3. Installing Qwt 5.1.1
    By WXNSNW in forum Qwt
    Replies: 3
    Last Post: 18th September 2008, 14:06
  4. Installing Qt 4 on Mac os X
    By qtray in forum Installation and Deployment
    Replies: 1
    Last Post: 8th August 2008, 21:34
  5. Installing
    By bsws1079 in forum Newbie
    Replies: 3
    Last Post: 2nd April 2007, 23:19

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.