nmake should be fine too.
Note, that qmake uses several default settings from how it was built itsself. So be careful that you don't have a Qt build with MinGW and you try to build Qwt with MSVC ( or v.v ).
Uwe
nmake should be fine too.
Note, that qmake uses several default settings from how it was built itsself. So be careful that you don't have a Qt build with MinGW and you try to build Qwt with MSVC ( or v.v ).
Uwe
Thank you, Uwe, for your comments. With your help, I was finally able to get the examples to compile.
This indicates that the documentation could be better. So much frustration could be avoided by having a simple, clear set of instructions. For example, you mention:The internet is full of reports how people managed to build some version of Qwt somehow. Most of them are full of pointless or wrong stepThis is a great help! Why oh why is this very helpful statement not included in the INSTALL file? Almost every other program compiles just fine from within Qt Creator - if this one doesn't, it should say so in bold type! Also the INSTALL file says "You need a release of qtmmlwidget >= 2.1." Do I have that? How do I find out? After digging around on the internet, it appears that this is now included in the default installation of Qt - so I think I can ignore this statement. Is that right?Using the creator ( or any other IDE ) for building Qwt is absolutely pointless and is one of the main reasons, why people fail
In any case, thanks for your help! I've tried to follow your directions. Here are the results.
00) Close Qt Creator if it is open.
0) unzip + cd <qwtrootdir>
I chose my Desktop (C:\Documents and Settings\...\Desktop)
1) Comment/Uncomment the build options in qwtconfig.pri to your needs
Since all I want to do is see the examples for now, I will leave this unmodified, assuming that the defaults should compile the provided examples.
2) qmake
This worked.
3) make
Nope. 'make' is not recognized...
Try 'nmake'.
Nope. 'nmake' is not recognized...
Try 'mingw32-make'
Nope. "Cannot find 'c:\Documents'. Cannot find 'and'. Cannot find 'Settings...'
Ok, it doesn't like spaces. How do I fix this? No idea, so try moving the directory somewhere without spaces. I chose "C:\qwt-6.0.0-rc5".
Try 'mingw32-make'
Hallelujah! It compiled!
4) make install
'mingw32-make install'
Worked.
And now to test the examples:
5) Open Qt Creator.
6) Open project C:\qwt-6.00-rc5\examples\spectrogram\spectrogram.pro
It worked! Hurray!
dare5421 (17th March 2011)
Even more frustration could be avoided by simply following these very simple, clear set of instructions:
qmake
make
make install
Of course you can build Qwt with the Creator - but you need to know this tool. An experienced user of the Creator and the qmake build system won't have many problems - but in the end it does nothing else than qmake + make. So its not necessary to know about the Creator because it offers nothing interesting here beside for people that are afraid of using the command line.Why oh why is this very helpful statement not included in the INSTALL file? Almost every other program compiles just fine from within Qt Creator - if this one doesn't, it should say so in bold type!
I could also write down 100 other things you shouldn't do - but the only important information is to read the INSTALL file and to do what is written there. If you have problems with these steps ask on a support channel ( f.e here ).
No it is not included in the default installation of Qt, but yes you can ignore this statement as long as you are not interested in MathML support.Also the INSTALL file says "You need a release of qtmmlwidget >= 2.1." Do I have that? How do I find out? After digging around on the internet, it appears that this is now included in the default installation of Qt - so I think I can ignore this statement. Is that right?
Note, that the situation is different with Qwt 6.x. As Nokia has changed the license of the Qt solution package Qwt 6 includes a modified and stripped down version of the qtmmlwidget source code, that is built for license implications into a separate library ( when enabled in qwtconfig.pri ).
Let me comment them as again this is a piece of information others will try to follow.Here are the results.
Every reader should note, that your results are for a Qwt 5.x package and an unknown Qt 4 build - obviously done with mingw in release mode. Of course parts of these advices might be wrong for other Qt builds f.e with MSVC or debug mode.
Not necessary.00) Close Qt Creator if it is open.
O.k.0) unzip + cd <qwtrootdir>
I chose my Desktop (C:\Documents and Settings\...\Desktop)
There is an option in qwtconfig.pri, that controls if the examples should be built or not. Instead of assuming something it is better to set or unset this option.1) Comment/Uncomment the build options in qwtconfig.pri to your needs
Since all I want to do is see the examples for now, I will leave this unmodified, assuming that the defaults should compile the provided examples.
O.k.2) qmake
A problem of your environment, but of course mingw32-make is only for mingw environment. nmake is the MSVC counterpart - it doesn't make much sense to look for it when you are with mingw.3) make
Nope. 'make' is not recognized...
Try 'nmake'.
Nope. 'nmake' is not recognized...
I'm not sure, but this should be a problem of qmake or some missing quotes in the Qwt project files.Try 'mingw32-make'
Nope. "Cannot find 'c:\Documents'. Cannot find 'and'. Cannot find 'Settings...'
Ok, it doesn't like spaces. How do I fix this? No idea, so try moving the directory somewhere without spaces. I chose "C:\qwt-6.0.0-rc5".
Note, that "make install" only copies and reorganizes the files into a configurable target directory. Many people don't do this important step being afraid, that they harm the system.4) make install
Of course one could argue, that "make install" should do more changes to your system ( like adjusting the PATH or setting other system wide settings permanently ).
Pointless, when you have enabled building of the examples in qwtconfig.pri.And now to test the examples:
One additional warning for building your application: don't use the qmake project files used for building the examples, because they are written for building against the build directory - not the install directory.
Also note, that writing an application project file will be different between Qwt 5.x and Qwt 6.x, because Qwt 6 installs a qmake features file, that can be loaded by writing "CONFIG += qwt".
Uwe
Thank you, Uwe, for the helpful response. Also, thank you for authoring this package - it is quite beautiful.
Nevertheless, installing it could be easier. Please allow me to make some suggestions. The OP and I (and probably countless others) had the same problems, and it would be great if future users could avoid them. I would venture to say that most people (alas, myself included) do not read the INSTALL file until absolutely necessary. This may be bad practice, but I think it's an unfortunate reality. Why not read it? Well, usually it's not necessary. The usual steps when someone hands me a Qt project are: 1) Open it in Qt Creator. 2) Hit F5 (Build). If you do this with Qwt, however, you get the very misleading error the OP originally cited: "Qwt is configured without SVG support." Looking at the "Compile Output" tab, you see various errors listing missing files. This is what led me down the gloomy road of changing various paths, trying to get the code to compile.
So how do you do it? Can this be made the default? After all, Qt Creator is a development environment, and while there is nothing wrong with the command line, the beauty of having an IDE is that you don't have to leave it, and others have done a lot of work to make your life easier (e.g. F5 to build). In any case, it would certainly be nice if you could provide an error message that moves me in the right direction, e.g. "Don't compile Qwt here, do it from the command line".Of course you can build Qwt with the Creator...in the end it does nothing else than qmake + make
Thanks again for the great package and the help!
I've checked this and indeed building Qwt from a path with spaces is not possible. I tried the same with building the Creator itsself from a path with spaces - and it fails too.
Looks like a bug in qmake for the subdirs template. You can send a bug report for Qt if you want to.
I'm not aware of any workaround beside not using spaces - or stepping into each subdirectory and call qmake manually.
Don't know - but when you don't read an INSTALL file ( even after failing ! ) you also wouldn't read any of these warnings you were asking for.
This is what you are used to - but I question that the Creator is the most popular Qt development environment on any platform. On Windows it should be MSVC on the Mac you might have XCode and lucky UNIXoids developers are used to more powerful and comfortable stuff like vim :-).
Absolutely no - many Qt developers ( like me ) don't even have the Creator or any other IDE installed.
Note, that I don't own a Mac myself or have booted Windows for years. It's hard enough to build packages for so many platforms/versions I don't have myself, that I won't spend any time on making my life even harder with special hacks for all the possible IDEs ( I don't use myself ).
But of course I accept patches for the Qwt project files to support any IDEs - as long as they don't break plain qmake usage.
O.k. I installed the Creator on my Linux box and tried to build Qwt 6.0.0-rc5.
1) I opened qwt.pro.
For some reason the Creator has the default setting not to build Qwt in its source directory. This fails, because the relative paths used in the subdirectory project files doesn't work anymore. Well, maybe this could be fixed by introducing an environment variable for the root of the Qwt source tree, but this introduces one more source for problems for people not reading INSTALL files.
But the problem of the relative paths is something the Creator should/could learn. I recommend to send a problem report to the developer team of the Creator.
2) So I changed this "Shadow Build" setting in "Projects -> Build Settings" so, that the build is done in the Qwt source tree.
3) Then I started the build
Soon Qwt and all examples ( the build flag in qwtconfig.pri is enabled in Qwt 6.0.0-rc5 ) were built successfully.
Uwe
Ishmael (30th January 2011)
In MSVC, building Qwt (at least up to the 5.2 version I use now) is also straightforward, but you -do- have to know how to use MSVC to configure projects correctly, and this assumes you have the Visual Studio Qt plug-in / add-on installed:
1. Using the Qt plug-in, import the .pro file to make a Visual Studio .vsproj file from it.
2. Change whatever paths you need to point to your Qt installation.
3. Make any other changes; in my case, I change the names of the output libraries to match Qt conventions (debug has a "d" prefix, etc.) and locations for output files. I also build Qwt as a static library, so that requires removing QWT_DLL defines and changing the output type to static livrary.
4. Build.
It takes all of about 5 - 10 minutes to do all of the above. You need to do step 4 (only) each time you update Qt versions.
I am sure I do not have MSVC.
Szilvi
Sorry, I had to arrange other stuffs, but this one is far not forgotten. I could talk to somebody who might help me, I'll come back with the conclusion.
Szilvi
Hi, so the solution is the same someone had posted somewhere: I had to use mingw32-make instead of make.
If I could suggest something: maybe some changes in the INSTALL description would be useful for some other people like me, that on windows in case make does not work, just check what else is available in c:\Qt\2010.05\mingw\bin\ (or wherever qt has been installed).
Or there could be a "detaled install instructions fot those who has no idea why they failed whilst just following the steps in the INSTALL file"but really. I don't mean that would be the job of the developers, but could be still really helpful.
coming back soon with my problems with integrating qwt into the designer...Ok, no, I give time for that, hopefully I'll have less problems with that.
Szilvi
Bookmarks