Qwt compilation fails due to qwtd.dll not found.
-
Hi,
I am trying to compile qwt with QT5.1.1. I get an error message that qwtd.dll file was not found.
Ich was looking through the net, and found some similar problems ("like this one":http://qt-project.org/forums/viewthread/33014). I checked a couple of times if the LIBRARY_PATH is set, and if it is set to the right directoy. It is set to "C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin".The project itself is correct, it is an open source project which has compiled on several other machines (including my own pc at home).
The error trace is printed below:
@
linking ....\lib\qwtd.dll
g++: error: Mortensen\Desktop\WASABItwo\WASABIQtGui\WASABI-qwt-clone\qwt-code\qwt\src..\lib\libqwtd.a: No such file or directory
Makefile.Debug:320: recipe for target '....\lib\qwtd.dll' failed
mingw32-make[2]: *** [....\lib\qwtd.dll] Error 1
mingw32-make[2]: Leaving directory 'C:/Users/Jan Mortensen/Desktop/WASABItwo/WASABIQtGui/WASABI-qwt-clone/qwt-code/qwt/lib/src'
mingw32-make[1]: *** [debug-all] Error 2
Makefile:38: recipe for target 'debug-all' failed
mingw32-make[1]: Leaving directory 'C:/Users/Jan Mortensen/Desktop/WASABItwo/WASABIQtGui/WASABI-qwt-clone/qwt-code/qwt/lib/src'
mingw32-make: *** [sub-src-make_first-ordered] Error 2
makefile:40: recipe for target 'sub-src-make_first-ordered' failed
11:19:18: Der Prozess "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" wurde mit dem Rückgabewert 2 beendet.
Fehler beim Erstellen/Deployment des Projekts qwt(Kit: Desktop Qt 5.1.1 MinGW 32bit)
Bei der Ausführung von Schritt 'Make'
11:19:18: Verstrichene Zeit: 02:15.
@ -
Hi,
thanks for your reply. The project is an git project I have checked out from github. It consists of one project based on QT5.1.1 and two submodules, where a qwt-clone is one of them. Each of these project/modules is compiled separately.
Rerunning qmake has no effect and the result is still the same. -
Did you download "qwt ":http://qwt.sourceforge.net/qwtinstall.html separately?
There are different possibilities, AFAIK, but it worked for me to download the source and compiled the examples, this should include also the requested dlls. -
Yes, I downloaded it it, but not from an official location. The a copy of qwt is hosted on github by the owner of the project I am trying to compile.
But I think there should be nothing wrong with this version because as I said, on a different machine I was able to compile the whole project. It must have something to do with the local settings/installation of qt. -
I guess you are having different .pro files. One or more for the actual git project and one in addition for the qwt (e.g. qwt.pro). There should be one subdir template .pro file holding the information for all sub projects (actual git and also the qwt.pro).
Did you open this project?
If yes, all these different projects should be used while rerunning qmake and also for the build process. However, you can also click on specific sub-projects and rerun qmake and build only for this specific project. Doing the latter might create problems, when the initial overall project has already some discrepancies.
BTW are you using qt creator or are you handling all from command prompt? -
Yes, I have indeed one .pro file for each of the three projects. And I build every project separately. I followed the Readme.txt instructions from the project owner to build the project by opening the .pro files and build it with QTCreator.
I can not find the template .pro file you mentioned and I doubt it exists. I took a look into a list of all .pro files in the root directory and all its subdirectories.
To get this project run is generally a little bit tricky, because you have to set the build path for every project separately, but in the past I did it.
I also think there must a better setup for the project which lets you build the whole project as one. When I get it running I will rework the project structure a little bit. -
Sorry, sloppy expressed.
There should be one .pro file based on subdir template holding something like:
@
TEMPLATE = subdirsCONFIG += ordered
SUBDIRS += proj1
proj2
proj3
@This is placed in the main folder holding the three sub-folders (e.g. proj1, proj2 and proj3) and each of these should have a corresponding .pro files (e.g. proj1.pro, proj2.pro and proj3.pro).
If you have opened this main project .pro file, all the others are opened automatically. So, you can change from release to debug modes for this .pro file.
See also "subdirs":http://qt-project.org/doc/qt-5.0/qtdoc/qmake-variable-reference.html#subdirsHowever, you can also open the projects separately as you have done. The only explanation I have for your problem is that you have run qmake inconsistently (e.g. for qwt with release and the others with debug).
-
Thanks for your explanation. I will try to follow that structure and refactor the project in that way.
Currently I got the program run, by copying an other build from my computer at home (where the project compiles) into the build directory. So I can compile the main project. Due this is a very bad solution I will try to really fix the problem and post the solution.
-
Ok, I have a clue what could be the problem. I have spoken to the project leader and he ment, that probably he there where some changes in qwt which he has to insert into the submodule manually, what he has forgotten.
I will post if I have confirmed that this was the solution. -
-
[quote author="Mortl" date="1388482555"]Ok, now it works for me. Any parts of the project where incompatible with the compiler I have used.
It works with MinGW and Msvc 2010. Apparently I do not know which compiler I have used before. It was any Msvc compiler, but I do not know which one.[/quote]
This is a bit misleading in my opinion. Qwt source is probably compatible with any msvc compiler. At least I have used in the past msvc2005 successfully for compiling qwt source. There might some issues not directly compatible, because of some source handling changes from compiler version to compiler version. However, those should be in general minor.However, after qwt has been compiled with a specific version of msvc, the libs can be used only with this compiler. However, this is not a specific qwt problem, but holds true also with Qt libs and others. The same is also to a lesser extend with MinGW compiler. AFAIK some versions might be compatible, but that is not true in general. The compiler as used for pre-build of Qt 4.8 MinGW 4.4 is not compatible with MinGW 4.8. IIRC there was at least around version MinGW 4.7 a break in compatibility.
In addition to compiler dependency there might be also code dependencies. Qt 5.1 requires Qwt 6.1.