Error: Compiling legacy Souce code
-
Hi @robrob,
once again: Qt Creator has nothing todo with the header files needed for building your application.
Important it the Qt version. And as @koahnig already said, you can use an older Qt version together with a newer Qt Creator. E.g. I'm using Qt Creator 4.5 together with Qt 4.8.2 and Qt 5.9.4 on Windows 7.
Which Windows version are you using?
-
Hi,
This version of Windows wasn’t even in development when 4.7 was released.
You should consider using 4.8.7 which is the latest and last of the Qt 4 series if you can’t upgrade to Qt 5.
-
Hi @robrob,
once again: Qt Creator has nothing todo with the header files needed for building your application.
Important it the Qt version. And as @koahnig already said, you can use an older Qt version together with a newer Qt Creator. E.g. I'm using Qt Creator 4.5 together with Qt 4.8.2 and Qt 5.9.4 on Windows 7.
Which Windows version are you using?
-
Hi,
You setup the Kits, then you can choose which one you want to use with your project.
-
Hi,
This version of Windows wasn’t even in development when 4.7 was released.
You should consider using 4.8.7 which is the latest and last of the Qt 4 series if you can’t upgrade to Qt 5.
-
If your Qt version is not already listed then yes, first add it and then create a Kit using it.
Take a look at the Qt Creator documentation on the subject.
@SGaist
About The Qt Creator version and the Qt version. When I pressed Help-->About Qt Creator to see which version I have the following for version 2.3.0:
"Version 2.3.0 based on Qt 4.7.4 (32bits)"
This made me believe that this version of Qt Creator work only with Qt 4.7.4. Am I got it wrong ? -
Yes you are wrong.
As already explained, Qt Creator is an IDE. What you see in the about box just tells you the version of Qt used to build Q Creator and that you would have to use if you were to build a plugin to be used by that version of Qt Creator.
It doesn’t matter for the various versions of Qt you want to use to build your applications/libraries.
-
Yes you are wrong.
As already explained, Qt Creator is an IDE. What you see in the about box just tells you the version of Qt used to build Q Creator and that you would have to use if you were to build a plugin to be used by that version of Qt Creator.
It doesn’t matter for the various versions of Qt you want to use to build your applications/libraries.
-
Yes you are wrong.
As already explained, Qt Creator is an IDE. What you see in the about box just tells you the version of Qt used to build Q Creator and that you would have to use if you were to build a plugin to be used by that version of Qt Creator.
It doesn’t matter for the various versions of Qt you want to use to build your applications/libraries.
For example if i use the following in my file
#include <QMessageBox>
#include <QColor>
#include <QColorDialog>
#include <QUrl>
#include <QDesktopServices>Does the Qt contain these header file or where they live because they are not user defined header?
-
For example if i use the following in my file
#include <QMessageBox>
#include <QColor>
#include <QColorDialog>
#include <QUrl>
#include <QDesktopServices>Does the Qt contain these header file or where they live because they are not user defined header?
@robrob said in Error: Compiling legacy Souce code:
Does the Qt contain these header file or where they live because they are not user defined header?
Yeah, they are part of Qt, and also the corresponding shared libraries.
You can easily find them by looking into your Qt installation directory.
-
@robrob said in Error: Compiling legacy Souce code:
Does the Qt contain these header file or where they live because they are not user defined header?
Yeah, they are part of Qt, and also the corresponding shared libraries.
You can easily find them by looking into your Qt installation directory.
Thanks guys for the help.
I think now I understand the principle of Qt and Qt Creator.
So the build process doesn't generate error related to legacy include files.
However there is error which I don't have a clue what is about.
Below is the output of the compiler:Running build steps for project SA430Gui...
Configuration unchanged, skipping qmake step.
Starting: "C:\Qt\qtcreator-2.2.0\mingw\bin\mingw32-make.exe"
c:\qt\4.7.4\bin\qmake.exe -spec c:\Qt\4.7.4\mkspecs\win32-g++ -o Makefile ..\Src\SA430Gui.pro
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
C:/Qt/qtcreator-2.2.0/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directoryC:/Users/rabmerab/Documents/Qt projects/SA430.Gui1/V2.0/SA430Gui-build-desktop' g++ -mthreads -Wl,-subsystem,windows -o debug\SA430GuiDbg.exe object_script.SA430GuiDbg.Debug -L"c:\Qt\4.7.4\lib" -lmingw32 -lqtmaind debug\Manifest_res.o ../Build/debug/libsa430dbg.a C:/Qt/qwt-6.0.0/lib/libqwtd.a -lQtXmld4 -lQtGuid4 -lQtCored4 mingw32-make[1]: Leaving directory
C:/Users/rabmerab/Documents/Qt projects/SA430.Gui1/V2.0/SA430Gui-build-desktop'
g++: ../Build/debug/libsa430dbg.a: No such file or directory
g++: C:/Qt/qwt-6.0.0/lib/libqwtd.a: No such file or directory
mingw32-make[1]: *** [debug\SA430GuiDbg.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "C:\Qt\qtcreator-2.2.0\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project SA430Gui (target: Desktop)
When executing build step 'Make'END of Compiler output.
The two errors are highlighted in bold font
There is no much information why it failed.The config part (from the SA430GUI.pro) are below:
CONFIG(debug, debug|release){
LIBS += ../Build/debug/libsa430dbg.a
LIBS += C:/Qt/qwt-6.0.0/lib/libqwtd.a
TARGET = SA430GuiDbg
}else{
LIBS += ../Build/release/libsa430.a
LIBS += C:/Qt/qwt-6.0.0/lib/libqwt.a
TARGET = SA430Gui
}Just to remind that this an open source code that was given to me. It is a legacy code (2011).
In desperate help please!
NB: I don't mind sharing the source code with anyone who want to look at it. -
Thanks guys for the help.
I think now I understand the principle of Qt and Qt Creator.
So the build process doesn't generate error related to legacy include files.
However there is error which I don't have a clue what is about.
Below is the output of the compiler:Running build steps for project SA430Gui...
Configuration unchanged, skipping qmake step.
Starting: "C:\Qt\qtcreator-2.2.0\mingw\bin\mingw32-make.exe"
c:\qt\4.7.4\bin\qmake.exe -spec c:\Qt\4.7.4\mkspecs\win32-g++ -o Makefile ..\Src\SA430Gui.pro
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
Qt: Untested Windows version 6.2 detected!
C:/Qt/qtcreator-2.2.0/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directoryC:/Users/rabmerab/Documents/Qt projects/SA430.Gui1/V2.0/SA430Gui-build-desktop' g++ -mthreads -Wl,-subsystem,windows -o debug\SA430GuiDbg.exe object_script.SA430GuiDbg.Debug -L"c:\Qt\4.7.4\lib" -lmingw32 -lqtmaind debug\Manifest_res.o ../Build/debug/libsa430dbg.a C:/Qt/qwt-6.0.0/lib/libqwtd.a -lQtXmld4 -lQtGuid4 -lQtCored4 mingw32-make[1]: Leaving directory
C:/Users/rabmerab/Documents/Qt projects/SA430.Gui1/V2.0/SA430Gui-build-desktop'
g++: ../Build/debug/libsa430dbg.a: No such file or directory
g++: C:/Qt/qwt-6.0.0/lib/libqwtd.a: No such file or directory
mingw32-make[1]: *** [debug\SA430GuiDbg.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "C:\Qt\qtcreator-2.2.0\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project SA430Gui (target: Desktop)
When executing build step 'Make'END of Compiler output.
The two errors are highlighted in bold font
There is no much information why it failed.The config part (from the SA430GUI.pro) are below:
CONFIG(debug, debug|release){
LIBS += ../Build/debug/libsa430dbg.a
LIBS += C:/Qt/qwt-6.0.0/lib/libqwtd.a
TARGET = SA430GuiDbg
}else{
LIBS += ../Build/release/libsa430.a
LIBS += C:/Qt/qwt-6.0.0/lib/libqwt.a
TARGET = SA430Gui
}Just to remind that this an open source code that was given to me. It is a legacy code (2011).
In desperate help please!
NB: I don't mind sharing the source code with anyone who want to look at it.@robrob said in Error: Compiling legacy Souce code:
g++: ../Build/debug/libsa430dbg.a: No such file or directory
g++: C:/Qt/qwt-6.0.0/lib/libqwtd.a: No such file or directoryThis looks ugly :-)
Especially LIBS += C:/Qt/qwt-6.0.0/lib/libqwt.a is really, well, bad.
Do you have these files in this directories? -
Especially LIBS += C:/Qt/qwt-6.0.0/lib/libqwt.a is really, well, bad.
Do you have these files in this directories?I searched for them and I couldn't find any.
Also the folder C:\Qt\qwt-600 doesn't have lib subfolder.
Strange is it? -
qwt is an externally library based on Qt. You need to download and compile yourself separately.
I guess you can use a newer version, but you need to try.@koahnig
I downlaoded a qwt install file from https://sourceforge.net/projects/qwt/files/qwt/6.0.0/qwt-6.0.0.zip/download then I run the installation.
Also I downloaded a zip file and both methods generate the same folfer structure without the lib subfolder..
the folder are: doc, Exampes, Include and src. There is no such lib folder.
Do you know if this lib folder exist in qwt? -
You need to compile it, see http://qwt.sourceforge.net/qwtinstall.html
-
@koahnig
I downlaoded a qwt install file from https://sourceforge.net/projects/qwt/files/qwt/6.0.0/qwt-6.0.0.zip/download then I run the installation.
Also I downloaded a zip file and both methods generate the same folfer structure without the lib subfolder..
the folder are: doc, Exampes, Include and src. There is no such lib folder.
Do you know if this lib folder exist in qwt?