Hi everyone,
I've got QT Creator v4 and Qwt v4.2. How do I put two together? I read the INSTALL file and it seems to be for MS Visual Studio.
Thanks for the help.
Kevin
Printable View
Hi everyone,
I've got QT Creator v4 and Qwt v4.2. How do I put two together? I read the INSTALL file and it seems to be for MS Visual Studio.
Thanks for the help.
Kevin
Qwt 4.2 is a pretty old release for Qt 3 and Qt2. It won't work with Qt 4.
Uwe
Great Thanks.
I have downloaded and build the Qwt 5.2 with my QT Designer. How do I integrate those two?
Kevin
I think I'm getting hand of it. I built Qwt as static and load static plugin using steps from http://qt.nokia.com/doc/4.5/tools-plugandpaint.html (at end of the page). I am now running into a issue.
When building my application, I get this error:
release/main.o:main.cpp:(.text+0x139): undefined reference to `qt_plugin_instance_qwt()'
collect2: ld returned 1 exit status
All I did was using Q_IMPORT_PLUGIN(qwt) in main function and modified the .pro file. How should I resolve this issue?
Kevin
NVM. Got it resolved!!! :)
It would be great if you can share how you resolved it.
Thanks
This is how I setup:
1. I unzip everything to C:\Qt\2009.04\qwt-5.2.0 folder (C:\Qt\2009.04 is my QT Creator install folder).
2. I open C:\Qt\2009.04\qwt-5.2.0\qwtconfig.pri file with text editor
3. enabled debug and release build (around line 50 to line 53)
4. build static libraries instead of shared (around line 77 to line 79)
5. save and close the file.
6. open the C:\Qt\2009.04\qwt-5.2.0\qwt.pro file w/ QT and rebuild the whole thing
7. open my own project file (<project_name>.pro)
8. add the following lines to the end of the pro file:
9. to link to the qwt, use #include <lib_file>. (for example, u need #include <qwt_plot.h> for your code to be able to allocate QwtPlot object.Code:
QWT_LOCATION = C:/Qt/2009.04/qwt-5.2.0 # Qwt location (must match exactly to where you unzip the files) INCLUDEPATH += $${QWT_LOCATION}/src LIBS = -L$${QWT_LOCATION}/lib \ -lqwt # The following section is to select static lib base on debug or release build if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { mac:LIBS = $$member(LIBS, 0) \ $$member(LIBS, 1)_debug win32:LIBS = $$member(LIBS, 0) \ $$member(LIBS, 1)d }
10. build your application.
Kevin
One step is missing: "make install"
Don't know why, but many people ( especially Windows developers) don't like to install/uninstall Qwt and work with the build directory instead. But at least on unixoid systems ( like the Mac ) you should do it.
Uwe
Hi!
I configured Qwt on Windows 7 like you did and all the exemples work !!
Except, when I try to run a project, I get theses errors related to the qmake step:
Code:
Exécution des étapes de compilation pour le projet plotscroll... Configuration non modifiée, passe l'étape QMake. Lancement : C:/Qt/2010.03/mingw/bin/mingw32-make.exe -w mingw32-make: Entering directory `C:/Users/Geneviève/Desktop/plotscroll' c:\qt\2010.03\qt\bin\qmake.exe -spec ..\..\..\..\Qt\2010.03\qt\mkspecs\win32-g++ -win32 -o Makefile plotscroll.pro mingw32-make: Leaving directory `C:/Users/Geneviève/Desktop/plotscroll' mingw32-make: Entering directory `C:/Users/Geneviève/Desktop/plotscroll' C:/Qt/2010.03/mingw/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Users/Geneviève/Desktop/plotscroll' g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\plotscroll.exe debug/plot.o debug/thread.o debug/win.o debug/main.o debug/moc_plot.o debug/moc_thread.o debug/moc_win.o -L"c:\Qt\2010.03\qt\lib" -lmingw32 -lqtmaind -LC:/Qt/2010.03/qwt-5.2.1/qwt-5.2.1/lib\-lqwt d -lQtGuid4 -lQtCored4 mingw32-make[1]: Leaving directory `C:/Users/Geneviève/Desktop/plotscroll' mingw32-make: Leaving directory `C:/Users/Geneviève/Desktop/plotscroll' g++: d: No such file or directory mingw32-make[1]: *** [debug\plotscroll.exe] Error 1 mingw32-make: *** [debug] Error 2 Terminé avec le code de sortie 2. Erreur lors de la compilation du projet plotscroll //Error in the compilation of plotscroll project lors de l'éxecution de l'étape 'Make'
Here's my .pro file:
Code:
QWT_LOCATION = C:/Qt/2010.03/qwt-5.2.1/qwt-5.2.1 # Qwt location (must match exactly to where you unzip the files) INCLUDEPATH += $${QWT_LOCATION}/src LIBS = -L$${QWT_LOCATION}/lib\-lqwt # The following section is to select static lib base on debug or release build7. if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { mac:LIBS = $$member(LIBS, 0) \ $$member(LIBS, 1)_debug win32:LIBS = $$member(LIBS,0)\ $$member(LIBS, 1)d } TEMPLATE = app HEADERS += \ plot.h \ thread.h \ win.h \ SOURCES += \ plot.cpp \ thread.cpp \ win.cpp \ main.cpp
How can I fix this ?
Thanks for your help !!
Same with me. It's the debug setting that's bugging. Changed it to Release and it seems to work fine.
15th June 2010...