Qt - statically compiled exe refers shared lib - c++

My static compilation in Qt worked fine upto this week. I reinstalled the qt, and recompiled the static version. The headache started after this. Now, even though I compiled using tatic version. The resulting exe requires the Qt libs. I checked the exe with "dependency Walker". It showed that the required dll's path are pointing towards the dynamic/shared libs path. Here are my settings
Environment:
QTDYNDIR : D:\tempinstallationfolder\Qt\dynamic
QTSTADIR : D:\tempinstallationfolder\Qt\static
Path : %QTDYNDIR%\bin;%QTDYNDIR%\qt\bin;%QTDYNDIR%\mingw\bin;
%QTSTADIR%\bin;%QTSTADIR%\qt\bin;%QTSTADIR%\mingw\bin;
I add the mingw,qt paths
Somehow it manages to follow the dynamic lib's path. I don't know where I made the mistake.
Can anybody help me in this issue?.
Note: I am using Windows platform - qt - 4.7.0 (qt - open source v2010.05)of static,dynamic to the Qt-Creater=>Tools=>Options=>Qt.
EDIT:
This one is from the compile output. There is no dynamic path directory mentioned in these.
Running build steps for project CalendarNew...
Starting: "D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make.exe" clean -w
mingw32-make: Entering directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make -f Makefile.Release clean
mingw32-make[1]: Entering directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
del release\moc_CalendarWidget.cpp release\moc_DateSquareEditWidget.cpp release\moc_GeneralSettingsWidget.cpp release\moc_MyColorButton.cpp release\moc_MyLabel.cpp
del release\CalendarWidget.o release\DateSquare.o release\DateSquareEditWidget.o release\GeneralSettingsWidget.o release\main.o release\MyColorButton.o release\MyLabel.o release\moc_CalendarWidget.o release\moc_DateSquareEditWidget.o release\moc_GeneralSettingsWidget.o release\moc_MyColorButton.o release\moc_MyLabel.o
mingw32-make[1]: Leaving directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make -f Makefile.Debug clean
mingw32-make[1]: Entering directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
del debug\moc_CalendarWidget.cpp debug\moc_DateSquareEditWidget.cpp debug\moc_GeneralSettingsWidget.cpp debug\moc_MyColorButton.cpp debug\moc_MyLabel.cpp
del debug\CalendarWidget.o debug\DateSquare.o debug\DateSquareEditWidget.o debug\GeneralSettingsWidget.o debug\main.o debug\MyColorButton.o debug\MyLabel.o debug\moc_CalendarWidget.o debug\moc_DateSquareEditWidget.o debug\moc_GeneralSettingsWidget.o debug\moc_MyColorButton.o debug\moc_MyLabel.o
mingw32-make[1]: Leaving directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
mingw32-make: Leaving directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
Could Not Find C:\Documents and Settings\prabhakaran\Desktop\CalendarNew-build-desktop\debug\moc_CalendarWidget.cpp
Could Not Find C:\Documents and Settings\prabhakaran\Desktop\CalendarNew-build-desktop\debug\CalendarWidget.o
The process "D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make.exe" exited normally.
Configuration unchanged, skipping qmake step.
Starting: "D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\CalendarWidget.o ..\CalendarNew\CalendarWidget.cpp
..\CalendarNew\CalendarWidget.cpp: In constructor 'CalendarWidget::CalendarWidget()':
..\CalendarNew\CalendarWidget.cpp:93: warning: 'default_String_Fontsize' may be used uninitialized in this function
..\CalendarNew\CalendarWidget.cpp:96: warning: 'lower_String_Fontsize' may be used uninitialized in this function
..\CalendarNew\CalendarWidget.cpp: In constructor 'CalendarWidget::CalendarWidget()':
..\CalendarNew\CalendarWidget.cpp:93: warning: 'default_String_Fontsize' may be used uninitialized in this function
..\CalendarNew\CalendarWidget.cpp:96: warning: 'lower_String_Fontsize' may be used uninitialized in this function
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\DateSquare.o ..\CalendarNew\DateSquare.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\DateSquareEditWidget.o ..\CalendarNew\DateSquareEditWidget.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\GeneralSettingsWidget.o ..\CalendarNew\GeneralSettingsWidget.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\main.o ..\CalendarNew\main.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\MyColorButton.o ..\CalendarNew\MyColorButton.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\MyLabel.o ..\CalendarNew\MyLabel.cpp
D:\TempInstallationFolder\Qt\static\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\CalendarNew\CalendarWidget.h -o release\moc_CalendarWidget.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\moc_CalendarWidget.o release\moc_CalendarWidget.cpp
D:\TempInstallationFolder\Qt\static\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\CalendarNew\DateSquareEditWidget.h -o release\moc_DateSquareEditWidget.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\moc_DateSquareEditWidget.o release\moc_DateSquareEditWidget.cpp
D:\TempInstallationFolder\Qt\static\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\CalendarNew\GeneralSettingsWidget.h -o release\moc_GeneralSettingsWidget.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\moc_GeneralSettingsWidget.o release\moc_GeneralSettingsWidget.cpp
D:\TempInstallationFolder\Qt\static\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\CalendarNew\MyColorButton.h -o release\moc_MyColorButton.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\moc_MyColorButton.o release\moc_MyColorButton.cpp
D:\TempInstallationFolder\Qt\static\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\CalendarNew\MyLabel.h -o release\moc_MyLabel.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\TempInstallationFolder\Qt\static\qt\include\QtCore" -I"d:\TempInstallationFolder\Qt\static\qt\include\QtGui" -I"d:\TempInstallationFolder\Qt\static\qt\include" -I"..\CalendarNew" -I"d:\TempInstallationFolder\Qt\static\qt\include\ActiveQt" -I"release" -I"." -I"d:\TempInstallationFolder\Qt\static\qt\mkspecs\win32-g++" -o release\moc_MyLabel.o release\moc_MyLabel.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\CalendarNew.exe object_script.CalendarNew.Release -L"d:\TempInstallationFolder\Qt\static\qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
mingw32-make[1]: Leaving directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
mingw32-make: Leaving directory `C:/Documents and Settings/prabhakaran/Desktop/CalendarNew-build-desktop'
The process "D:/TempInstallationFolder/Qt/static/mingw/bin/mingw32-make.exe" exited normally.
Note: Now only I made the fresh install for dynamic and static . Still it is capable to produce the same result.

Have you added this line to your projectname.pro file?
CONFIG += static
and made sure that in QtCreator-Projects-Build settings the 'Qt-version' points to your static build?

I am not sure that this is the correct answer. I made the following changes. I am not sure which one corrected my problem.
1)It seems there must be a environment variable called as QTDIR which points to the dynamic installation dir.
2)I compiled the qt libs for static build using "visual studio" rather than "mingw".
After these steps I added the absolute paths of static and dynamic (qt-bin,lib,minwg-bin,lib) to the path.
Now, my things are working fine. I didn't vote it as a correct answer. Thereby some one can give the exact answer.

Related

Using two different header file extensions in Qt Creator (Windows)

I have the following error if I want to build a project: LNK1181: cannot open input file "release\main.obj".
According to this question the problem seems to be that I want to include .h header files and .hpp header files in one Qt project. This is more or less necessary, because we are using opencv.
Here is the .pro-file:
#-------------------------------------------------
#
# Project created by QtCreator 2016-10-18T11:37:00
#
#-------------------------------------------------
QT += core gui datavisualization charts
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Qt_OpenCV_Test
TEMPLATE = app
win32 {
INCLUDEPATH += C:\\OpenCV-3.1.0\\opencv\\build\\include
LIBS += -LC:\\OpenCV-3.1.0\\mybuild\\lib\\Debug \
-lopencv_calib3d310d \
-lopencv_core310d \
-lopencv_features2d310d \
-lopencv_flann310d \
-lopencv_highgui310d \
-lopencv_imgcodecs310d \
-lopencv_imgproc310d \
-lopencv_ml310d \
-lopencv_objdetect310d \
-lopencv_photo310d \
-lopencv_shape310d \
-lopencv_stitching310d \
-lopencv_superres310d \
-lopencv_ts310d \
-lopencv_video310d \
-lopencv_videoio310d \
-lopencv_videostab310d \
}
unix {
CONFIG += link_pkgconfig
PKGCONFIG += opencv
LIBS += -L/usr/include/opencv
LIBS += -L"$$PWD/sqlite3" -lsqlite3
}
SOURCES += src/main.cpp \
src/Utils/utils.cpp \
src/Utils/db_manager.cpp \
src/Gui/mainwindow.cpp \
src/Gui/cqtopencvviewergl.cpp \
src/Gui/DataVisualization/simpledatavisualization.cpp \
src/Gui/DataVisualization/surfacedatavisualization.cpp \
src/Gui/DataVisualization/datavisualization.cpp \
src/OpenCV/cv_manager.cpp \
src/OpenCV/cv_camera.cpp \
HEADERS += include/Utils/utils.h \
include/Utils/containers.h \
include/Utils/db_manager.h \
include/Gui/mainwindow.h \
include/Gui/cqtopencvviewergl.h \
include/Gui/DataVisualization/simpledatavisualization.h \
include/Gui/DataVisualization/surfacedatavisualization.h \
include/Gui/DataVisualization/datavisualization.h \
include/OpenCV/cv_manager.h \
include/OpenCV/cv_camera.h \
FORMS += src/Gui_Ui/mainwindow.ui \
src/Gui_Ui/simpledatavisualization.ui \
src/Gui_Ui/surfacedatavisualization.ui
DISTFILES += \
CMakeLists.txt
And here is the output from the compiler:
13:35:24: Führe Schritte für Projekt Stp aus...
13:35:24: Starte "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe" clean
C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release clean
del release\moc_mainwindow.cpp release\moc_cqtopencvviewergl.cpp release\moc_simpledatavisualization.cpp release\moc_surfacedatavisualization.cpp
F:\Downloads\ProjektBuild\release\moc_mainwindow.cpp konnte nicht gefunden werden
del ui_mainwindow.h ui_simpledatavisualization.h ui_surfacedatavisualization.h
F:\Downloads\ProjektBuild\ui_mainwindow.h konnte nicht gefunden werden
del release\main.obj release\utils.obj release\db_manager.obj release\mainwindow.obj release\cqtopencvviewergl.obj release\simpledatavisualization.obj release\surfacedatavisualization.obj release\datavisualization.obj release\cv_manager.obj release\cv_camera.obj release\moc_mainwindow.obj release\moc_cqtopencvviewergl.obj release\moc_simpledatavisualization.obj release\moc_surfacedatavisualization.obj
F:\Downloads\ProjektBuild\release\main.obj konnte nicht gefunden werden
del release\Qt_OpenCV_Test.exp
F:\Downloads\ProjektBuild\release\Qt_OpenCV_Test.exp konnte nicht gefunden werden
C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug clean
del debug\moc_mainwindow.cpp debug\moc_cqtopencvviewergl.cpp debug\moc_simpledatavisualization.cpp debug\moc_surfacedatavisualization.cpp
del ui_mainwindow.h ui_simpledatavisualization.h ui_surfacedatavisualization.h
del debug\main.obj debug\utils.obj debug\db_manager.obj debug\mainwindow.obj debug\cqtopencvviewergl.obj debug\simpledatavisualization.obj debug\surfacedatavisualization.obj debug\datavisualization.obj debug\cv_manager.obj debug\cv_camera.obj debug\moc_mainwindow.obj debug\moc_cqtopencvviewergl.obj debug\moc_simpledatavisualization.obj debug\moc_surfacedatavisualization.obj
del debug\Qt_OpenCV_Test.exp debug\Qt_OpenCV_Test.ilk debug\Qt_OpenCV_Test.idb
F:\Downloads\ProjektBuild\debug\moc_mainwindow.cpp konnte nicht gefunden werden
F:\Downloads\ProjektBuild\ui_mainwindow.h konnte nicht gefunden werden
F:\Downloads\ProjektBuild\debug\main.obj konnte nicht gefunden werden
F:\Downloads\ProjektBuild\debug\Qt_OpenCV_Test.exp konnte nicht gefunden werden
del Qt_OpenCV_Test.exp
F:\Downloads\ProjektBuild\Qt_OpenCV_Test.exp konnte nicht gefunden werden
13:35:24: Der Prozess "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe" wurde normal beendet.
13:35:24: Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
13:35:24: Starte "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe"
C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\uic.exe "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\src\Gui_Ui\mainwindow.ui" -o ui_mainwindow.h
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\uic.exe "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\src\Gui_Ui\simpledatavisualization.ui" -o ui_simpledatavisualization.h
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\uic.exe "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\src\Gui_Ui\surfacedatavisualization.ui" -o ui_surfacedatavisualization.h
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1900 -D_WIN32 -IC:/Qt/Qt5.7.0/5.7/msvc2015/mkspecs/win32-msvc2015 -I"F:/Dropbox/Studium/5. Semester/Systemtechnikprojekt/StpGIT/main" -IC:/OpenCV-3.1.0/opencv/build/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtDataVisualization -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCharts -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtWidgets -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtGui -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtANGLE -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCore -I. "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\include\Gui\mainwindow.h" -o release\moc_mainwindow.cpp
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1900 -D_WIN32 -IC:/Qt/Qt5.7.0/5.7/msvc2015/mkspecs/win32-msvc2015 -I"F:/Dropbox/Studium/5. Semester/Systemtechnikprojekt/StpGIT/main" -IC:/OpenCV-3.1.0/opencv/build/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtDataVisualization -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCharts -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtWidgets -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtGui -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtANGLE -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCore -I. "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\include\Gui\cqtopencvviewergl.h" -o release\moc_cqtopencvviewergl.cpp
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1900 -D_WIN32 -IC:/Qt/Qt5.7.0/5.7/msvc2015/mkspecs/win32-msvc2015 -I"F:/Dropbox/Studium/5. Semester/Systemtechnikprojekt/StpGIT/main" -IC:/OpenCV-3.1.0/opencv/build/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtDataVisualization -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCharts -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtWidgets -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtGui -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtANGLE -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCore -I. "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\include\Gui\DataVisualization\simpledatavisualization.h" -o release\moc_simpledatavisualization.cpp
C:\Qt\Qt5.7.0\5.7\msvc2015\bin\moc.exe -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1900 -D_WIN32 -IC:/Qt/Qt5.7.0/5.7/msvc2015/mkspecs/win32-msvc2015 -I"F:/Dropbox/Studium/5. Semester/Systemtechnikprojekt/StpGIT/main" -IC:/OpenCV-3.1.0/opencv/build/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtDataVisualization -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCharts -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtWidgets -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtGui -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtANGLE -IC:/Qt/Qt5.7.0/5.7/msvc2015/include/QtCore -I. "..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main\include\Gui\DataVisualization\surfacedatavisualization.h" -o release\moc_surfacedatavisualization.cpp
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I"..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main" -I. -IC:\OpenCV-3.1.0\opencv\build\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtDataVisualization -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCharts -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtWidgets -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtGui -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtANGLE -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCore -Irelease -I. -IC:\Qt\Qt5.7.0\5.7\msvc2015\mkspecs\win32-msvc2015 -Forelease\ #C:\Users\SUITWO~1\AppData\Local\Temp\moc_mainwindow.obj.7008.452.jom
moc_mainwindow.cpp
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I"..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main" -I. -IC:\OpenCV-3.1.0\opencv\build\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtDataVisualization -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCharts -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtWidgets -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtGui -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtANGLE -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCore -Irelease -I. -IC:\Qt\Qt5.7.0\5.7\msvc2015\mkspecs\win32-msvc2015 -Forelease\ #C:\Users\SUITWO~1\AppData\Local\Temp\moc_simpledatavisualization.obj.7008.530.jom
moc_simpledatavisualization.cpp
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I"..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main" -I. -IC:\OpenCV-3.1.0\opencv\build\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtDataVisualization -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCharts -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtWidgets -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtGui -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtANGLE -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCore -Irelease -I. -IC:\Qt\Qt5.7.0\5.7\msvc2015\mkspecs\win32-msvc2015 -Forelease\ #C:\Users\SUITWO~1\AppData\Local\Temp\moc_cqtopencvviewergl.obj.7008.546.jom
moc_cqtopencvviewergl.cpp
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_DATAVISUALIZATION_LIB -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I"..\..\Dropbox\Studium\5. Semester\Systemtechnikprojekt\StpGIT\main" -I. -IC:\OpenCV-3.1.0\opencv\build\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtDataVisualization -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCharts -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtWidgets -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtGui -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtANGLE -IC:\Qt\Qt5.7.0\5.7\msvc2015\include\QtCore -Irelease -I. -IC:\Qt\Qt5.7.0\5.7\msvc2015\mkspecs\win32-msvc2015 -Forelease\ #C:\Users\SUITWO~1\AppData\Local\Temp\moc_surfacedatavisualization.obj.7008.982.jom
moc_surfacedatavisualization.cpp
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:release\Qt_OpenCV_Test.exe #C:\Users\SUITWO~1\AppData\Local\Temp\Qt_OpenCV_Test.exe.7008.4009.jom
LINK : fatal error LNK1181: Eingabedatei "release\main.obj" kann nicht geöffnet werden.
jom: F:\Downloads\ProjektBuild\Makefile.Release [release\Qt_OpenCV_Test.exe] Error 1181
jom: F:\Downloads\ProjektBuild\Makefile [release] Error 2
13:35:28: Der Prozess "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe" wurde mit dem Rückgabewert 2 beendet.
Fehler beim Erstellen/Deployment des Projekts Stp (Kit: Desktop Qt 5.7.0 MSVC2015 32bit)
Bei der Ausführung von Schritt "Make"
13:35:28: Verstrichene Zeit: 00:04.
Is it possible to use two different header file extensions in one Qt project?
How can I fix this problem ?
I appreciate your help!
The solution was quite simple. I usde a project directory path without spaces.

Syntax error: EOF in backquote substitution make: *** [mainwindow.o] Error 2

I am trying to compile a Qt project downloaded from Git hub. I got the following error during the compilation.
/bin/sh: 1: Syntax error: EOF in backquote substitution
make: * [mainwindow.o] Error 2
****08:33:27: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project FiniteElements (kit: Desktop)
When executing step 'Make'******
My .pro file is as below,
QT += core gui opengl widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000`
TARGET = FiniteElements
TEMPLATE = app
LIBS += -lqwt
INCLUDEPATH += "/usr/include/qwt/"
SOURCES += main.cpp\
mainwindow.cpp \
FiniteElements.cpp \
graph_plot.cpp
HEADERS += mainwindow.h \
FiniteElements.h \
graph_plot.h
Can anyone help me?
Instructions tested on Ubuntu 16.04.1 LTS with qt5-default 5.5.1+dfsg-16ubuntu7 and libqwt-qt5-dev 6.1.2-5 installed:
Clone the repo:
$ git clone https://github.com/MKrishtop/FiniteElements.git
Cloning into 'FiniteElements'...
remote: Counting objects: 17, done.
remote: Total 17 (delta 0), reused 0 (delta 0), pack-reused 17
Unpacking objects: 100% (17/17), done.
Checking connectivity... done.
Port from Qt 4 to Qt 5:
$ cd FiniteElements/
$ find . -type f -exec sed -i 's/QtGui/QtWidgets/g' {} \;
$ find . -type f -exec sed -i 's/toAscii/toLocal8Bit/g' {} \;
$ sed -i 's/-lqwt/-lqwt-qt5/g' FiniteElements.pro
For the reference, here's the full diff:
$ git diff
diff --git a/FiniteElements.pro b/FiniteElements.pro
index a2edb50..610f9f7 100644
--- a/FiniteElements.pro
+++ b/FiniteElements.pro
## -8,7 +8,7 ## QT += core gui opengl
TARGET = FiniteElements
TEMPLATE = app
-LIBS += -lqwt
+LIBS += -lqwt-qt5
INCLUDEPATH += "/usr/include/qwt/"
diff --git a/graph_plot.h b/graph_plot.h
index 551941b..00cf205 100644
--- a/graph_plot.h
+++ b/graph_plot.h
## -1,7 +1,7 ##
#ifndef GRAPH_PLOT_H
#define GRAPH_PLOT_H
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
#include <QApplication>
#include <QString>
#include <qwt_plot.h>
diff --git a/main.cpp b/main.cpp
index 6bf7836..338bba0 100644
--- a/main.cpp
+++ b/main.cpp
## -1,4 +1,4 ##
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include <qwt_plot.h>
#include "mainwindow.h"
#include "FiniteElements.h"
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 1f0145f..2ecec7d 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
## -1,4 +1,4 ##
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
## -25,7 +25,7 ## void MainWindow::browse()
QString filepath = QFileDialog::getOpenFileName(this,tr("Select input datafile"),QDir::currentPath());
if (!filepath.isEmpty()) {
- std::string str = std::string(filepath.toAscii().data());
+ std::string str = std::string(filepath.toLocal8Bit().data());
const char * stuff = str.c_str();
A->SetFN(stuff);
A->evaluate();
diff --git a/mainwindow.h b/mainwindow.h
index fc8f0fb..4bcf0e1 100644
--- a/mainwindow.h
+++ b/mainwindow.h
## -3,7 +3,7 ##
#include <QDialog>
#include <QDir>
-#include <QtGui/QtGui>
+#include <QtWidgets/QtWidgets>
#include <QApplication>
#include <QString>
#include "FiniteElements.h"
Build:
$ qmake -v
QMake version 3.0
Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu
$ qmake
$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o main.o main.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o mainwindow.o mainwindow.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o FiniteElements.o FiniteElements.cpp
FiniteElements.cpp: In member function 'int FiniteElements::local_node()':
FiniteElements.cpp:185:6: warning: unused variable 'kf' [-Wunused-variable]
int kf=0,i=bpn,k=0;
^
FiniteElements.cpp:185:11: warning: unused variable 'i' [-Wunused-variable]
int kf=0,i=bpn,k=0;
^
FiniteElements.cpp:185:17: warning: unused variable 'k' [-Wunused-variable]
int kf=0,i=bpn,k=0;
^
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o graph_plot.o graph_plot.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/jpnurmi/Temp/FiniteElements -I/usr/include/qwt -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include mainwindow.h -o moc_mainwindow.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o moc_mainwindow.o moc_mainwindow.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/jpnurmi/Temp/FiniteElements -I/usr/include/qwt -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5 -I/usr/include/c++/5/backward -I/usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include graph_plot.h -o moc_graph_plot.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qwt -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o moc_graph_plot.o moc_graph_plot.cpp
g++ -m64 -Wl,-O1 -o FiniteElements main.o mainwindow.o FiniteElements.o graph_plot.o moc_mainwindow.o moc_graph_plot.o -L/usr/X11R6/lib64 -lqwt-qt5 -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
$

force 32 bits program in .pro file

I know I can run qmake from the command line and use:
-spec linux-g++-32
From the .pro file i've tried to add alternatively "-m32" or "-32" to "CFLAGS" or "QMAKE_CXXFLAGS" but it does not work.
CFLAGS += -m32
QMAKE_CXXFLAGS += -m32
What shall I do then ?
EDIT:
this is what is produced with the above flag...
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o fxa_march.o ../fxa_march/fxa_march.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o reports.o ../fxa_march/reports.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o fxa_march_params.o ../fxa_march/fxa_march_params.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o reportgroup.o ../fxa_march/reportgroup.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o db_wrapper.o ../fxa_march/db_wrapper.cpp
../fxa_march/db_wrapper.cpp: In function 'std::string as_string(FX::dbvalue, FX::dbtype)':
../fxa_march/db_wrapper.cpp:17: warning: enumeration value 'dbtype_dbvoid' not handled in switch
../fxa_march/db_wrapper.cpp:17: warning: enumeration value 'dbtype_dbdate' not handled in switch
../fxa_march/db_wrapper.cpp:17: warning: enumeration value 'dbtype_dbmoney' not handled in switch
g++ -Wl,-rpath,/Soft/fox_dev/Qt-4.7.4/lib -o fxa_march fxa_march.o reports.o fxa_march_params.o reportgroup.o db_wrapper.o -L/Soft/fox_dev/Qt-4.7.4/lib -L../../../fx/libfx -lfx -L../../../fx/MQLib -lMQ -L/Soft/fox_dev/boost/boost_bin/lib -lboost_timer -lboost_system -lboost_chrono -lboost_regex -L/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/lib -lxerces-c -lQtXmlPatterns -L/Soft/fox_dev/Qt-4.7.4/lib -lQtNetwork -lQtXml -lQtCore -lpthread
/usr/bin/ld: skipping incompatible ../../../fx/libfx/libfx.so when searching for -lfx
/usr/bin/ld: cannot find -lfx
collect2: ld returned 1 exit status
make: *** [fxa_march] Error 1
Ok, here is the point:
the diff between the generated makefile ( through QtCreator ) and the one generated by my command line is:
INCPATH = -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++-32 -I. -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I.
Vs
INCPATH = -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I.
however one can go to "Project-> Build Settings -> [choose configuration to modify] -> And edit the "Qmake step" with additionnal argument:
-spec linux-g++-32
you will also need to add in the .pro file either of:
CFLAGS += -m32
QMAKE_CXXFLAGS += -m32
In .pro file, try writting all commands inside a scope prefixed by win32
win32 {
SOURCES += paintwidget_win.cpp
# ...
}
Commands inside the scope will be run only if the win32 variable is set.

Compiling Qt3D under Windows 7

I am trying to compile and install Qt3D via these directions:
http://qt-project.org/wiki/Qt3D-Installation
I am using the Windows MinGW method, and am using the Qt MinGW terminal.
The first time I did the process, it complained of a lack of Perl. This seems to go contrary to the tutorial. So I installed Strawberry Perl. I couldn't find a recommendation for the flavor of Perl these build scripts expect on Windows.
When I say:
qmake qt3d.pro
It executes suspiciously fast.
When I say:
mingw32-make -j 3 install
I receive this error:
:\qt3d>mingw32-make -j 3 install
d src/ && ( test -e Makefile || C:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/src.pro -o Makefile ) && mingw32-make -f Makefile install
ingw32-make[1]: Entering directory 'c:/qt3d/src'
d threed/ && ( test -e Makefile || c:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/threed/threed.pro -o Makefile ) && c:/Qt/Tools/mingw48_32/bin/mingw32-make
f Makefile install
usr/bin/sh: c:/Qt/Tools/mingw48_32/bin/mingw32-make: Invalid argument
akefile:64: recipe for target 'sub-threed-install_subtargets-ordered' failed
ingw32-make[1]: *** [sub-threed-install_subtargets-ordered] Error 126
ingw32-make[1]: Leaving directory 'c:/qt3d/src'
akefile:55: recipe for target 'sub-src-install_subtargets' failed
ingw32-make: *** [sub-src-install_subtargets] Error 2
Frankly, I'm not sure what to make of this error.
What might I be doing wrong?
The above errors were produced with Qt 5.1.
Here is a similar error I produced via exact same process for Qt 5.3.
C:\qt3d>mingw32-make -j 3 install
cd src/ && ( test -e Makefile || C:/Qt/Qt5.3.0/5.3/mingw482_32/bin/qmake.exe C:/qt3d/src/src.pro -o Makefile ) && mingw32-make -f Makefile install
mingw32-make[1]: Entering directory 'c:/qt3d/src'
cd threed/ && ( test -e Makefile || c:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/threed/threed.pro -o Makefile ) && c:/Qt/Qt5.3.0/Tools/mingw482_32/bin/ming
w32-make -f Makefile install
mingw32-make[2]: Entering directory 'c:/qt3d/src/threed'
c:/Qt/Qt5.3.0/Tools/mingw482_32/bin/mingw32-make -f Makefile.Release install
c:/Qt/Qt5.3.0/Tools/mingw482_32/bin/mingw32-make -f Makefile.Debug install
mingw32-make[3]: Entering directory 'c:/qt3d/src/threed'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_T
O_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D
_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CO
RE_LIB -I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting
' -I'arrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'..
/../3rdparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertU
TF' -I'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'grap
hicsview' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtW
idgets' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.
1.1/mingw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/
include/QtNetwork' -I'.moc/release_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/release_shared/qglpainter.o painting/qglpainter.cpp
g++ -c -pipe -fno-keep-inline-dllexport -O2 -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_T
O_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D
_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CO
RE_LIB -I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting
' -I'arrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'..
/../3rdparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertU
TF' -I'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'grap
hicsview' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtW
idgets' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.
1.1/mingw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/
include/QtNetwork' -I'.moc/release_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/release_shared/qglattributedescription.o arrays/qglattributedesc
ription.cpp
mingw32-make[3]: Entering directory 'c:/qt3d/src/threed'
g++ -c -pipe -fno-keep-inline-dllexport -g -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D_
SCL_SECURE_NO_WARNINGS -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting' -I'a
rrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'../../3r
dparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertUTF' -I
'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'graphicsvi
ew' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtWidgets
' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.1.1/mi
ngw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/includ
e/QtNetwork' -I'.moc/debug_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/debug_shared/qglpainter.o painting/qglpainter.cpp
g++ -c -pipe -fno-keep-inline-dllexport -g -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D_
SCL_SECURE_NO_WARNINGS -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting' -I'a
rrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'../../3r
dparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertUTF' -I
'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'graphicsvi
ew' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtWidgets
' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.1.1/mi
ngw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/includ
e/QtNetwork' -I'.moc/debug_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/debug_shared/qglvertexbundle.o arrays/qglvertexbundle.cpp
painting/qglpainter.cpp: In member function 'int QGLPainter::pickObject(int, int) const':
painting/qglpainter.cpp:2348:29: error: 'class QOpenGLFunctions' has no member named 'glReadPixels'
context()->functions()->glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);
^
painting/qglpainter.cpp: In member function 'int QGLPainter::pickObject(int, int) const':
painting/qglpainter.cpp:2348:29: error: 'class QOpenGLFunctions' has no member named 'glReadPixels'
context()->functions()->glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);
^
Makefile.Release:4156: recipe for target '.obj/release_shared/qglpainter.o' failed
mingw32-make[3]: *** [.obj/release_shared/qglpainter.o] Error 1
mingw32-make[3]: Leaving directory 'c:/qt3d/src/threed'
Makefile:44: recipe for target 'release-install' failed
mingw32-make[2]: *** [release-install] Error 2
mingw32-make[2]: *** Waiting for unfinished jobs....
g++ -c -pipe -fno-keep-inline-dllexport -g -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D_
SCL_SECURE_NO_WARNINGS -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting' -I'a
rrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'../../3r
dparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertUTF' -I
'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'graphicsvi
ew' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtWidgets
' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.1.1/mi
ngw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/includ
e/QtNetwork' -I'.moc/debug_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/debug_shared/qarray.o arrays/qarray.cpp
Makefile.Debug:4155: recipe for target '.obj/debug_shared/qglpainter.o' failed
mingw32-make[3]: *** [.obj/debug_shared/qglpainter.o] Error 1
mingw32-make[3]: *** Waiting for unfinished jobs....
mingw32-make[3]: Leaving directory 'c:/qt3d/src/threed'
Makefile:58: recipe for target 'debug-install' failed
mingw32-make[2]: *** [debug-install] Error 2
mingw32-make[2]: Leaving directory 'c:/qt3d/src/threed'
Makefile:64: recipe for target 'sub-threed-install_subtargets-ordered' failed
mingw32-make[1]: *** [sub-threed-install_subtargets-ordered] Error 2
mingw32-make[1]: Leaving directory 'c:/qt3d/src'
Makefile:55: recipe for target 'sub-src-install_subtargets' failed
mingw32-make: *** [sub-src-install_subtargets] Error 2
C:\qt3d>
A similar error. What am I doing wrong here?
I had the same problem as you have with Qt 5.3, building Qt3D with Qt 5.2.1 on Windows 7. I resolved it by changing context->functions()->glReadPixels() by just glReadPixels () at line 2348 in qglpainter.cpp.
It is because of this error in the terminal:
painting/qglpainter.cpp: In member function 'int QGLPainter::pickObject(int, int) const':
painting/qglpainter.cpp:2348:29: error: 'class QOpenGLFunctions' has no member named 'glReadPixels'
context()->functions()->glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);
Now Qt3D is installed.
Turning my comment into a proper answer:
Q: It executes suspiciously fast.
You wish to run qmake recursively in a recursive build system structure such as Qt3D. That means you would need to pass the -r option to qmake, which is passed by default if you use QtCreator. You need to be explicit on the command line when running qmake manually.
Also, note that the "old" (current master) Qt3D code base is unmaintained, so there might be issues with upcoming Qt versions, albeit it got some patches back then to work with Qt 5 better. If you get issues due to new Qt version, you could create and hopefully send patches or just downgrade your main Qt version.
Everybody who still have problems while compiling, after installing perl on your machine, have a look at the path to the qt3d folder. There should be no spaces in it.

Undefined reference to object. Possible wrong implementation

I'm writing a program for a class in which I must make a card game where you must match a pair of cards. It uses a GUI written in Qt provided by the professor. I have a header file containing a class called CardDeck, which simulates a deck of cards. I have included this header file in the main .cpp file, yet whenever I try to call any member functions of this class, the compiler prints "undefined reference to `CardDeck::(member function)'". I have a .cpp file called CardDeck.cpp that defines the member functions that is in the project folder, but it may not compile right or something. I am fairly inexperienced, so I'm not sure. Any help would be appreciated. I am using MinGW compiler with NetBeans IDE.
main.cpp:
#include "CardDeck.h"
using namespace std;
// Declare any global variables (your deck object) here:
CardDeck gdeck(9, 14, 2);
void shuffleCards(){
gdeck.ShuffleDeck();
}
CardDeck.h:
#ifndef CARDDECK_H
#define CARDDECK_H
#include "PlayingCard.h"
#include <vector>
class CardDeck {
public:
CardDeck();
CardDeck(int, int, int);
void ShuffleDeck();
void DisplayXCards(int);
void DisplayContents() const;
private:
std::vector<PlayingCard> deck;
int begin;
int end;
int number_each;
};
#endif /* CARDDECK_H */
CardDeck.cpp:
#include <vector>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <functional>
#include "PlayingCard.h"
#include "CardDeck.h"
using namespace std;
CardDeck::CardDeck(){
begin = 2;
end = 14;
}
CardDeck::CardDeck(int b, int e, int num_each){
begin = b;
end = e;
number_each = num_each;
char shapes[4] = {'H', 'S', 'C', 'D'};
for(int k=0; k<number_each; k++){
for(int j=0; j<4; j++){
for(int i = begin; i<= end; i++){
PlayingCard pc(i, shapes[j]);
deck.push_back(pc);
}
}
}
}
void CardDeck::DisplayContents() const{
for(int k=0; k<deck.size(); k++){
cout << deck[k].DisplayName() << endl;
}
}
void CardDeck::ShuffleDeck(){
random_shuffle(deck.begin(), deck.end());
}
void CardDeck::DisplayXCards(int n){
for(int i=0; i<n; i++){
cout << deck[i].DisplayName() << endl;
}
}
Makefile:
#############################################################################
# Makefile for building: cs215pgm3
# Generated by qmake (2.01a) (Qt 4.8.0) on: Thu Mar 1 15:03:59 2012
# Project: cs215pgm3.pro
# Template: app
# Command: c:/QtSDK/Desktop/Qt/4.8.0/mingw/bin/qmake.exe QMAKE_CC=C:/QtSDK/mingw/bin/gcc.exe QMAKE_CXX=C:/QtSDK/mingw/bin/g++.exe "QMAKE_CFLAGS=-g3 -gdwarf-2" "QMAKE_CXXFLAGS=-g3 -gdwarf-2" -o Makefile cs215pgm3.pro
#############################################################################
first: debug
install: debug-install
uninstall: debug-uninstall
MAKEFILE = Makefile
QMAKE = c:/QtSDK/Desktop/Qt/4.8.0/mingw/bin/qmake.exe
DEL_FILE = rm
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp
COPY_FILE = $(COPY)
COPY_DIR = cp -r
INSTALL_FILE = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm
SYMLINK =
DEL_DIR = rmdir
MOVE = mv
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
SUBTARGETS = \
debug \
release
debug: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_default: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug first
debug-all: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall
release: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_default: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_first: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release first
release-all: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release all
release-clean: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release clean
release-distclean: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release distclean
release-install: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release install
release-uninstall: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release uninstall
Makefile: cs215pgm3.pro c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default/qmake.conf c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/qconfig.pri \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/modules/qt_webkit_version.pri \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/qt_functions.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/qt_config.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/exclusive_builds.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/default_pre.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/default_pre.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/debug.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/debug_and_release.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/default_post.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/default_post.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/rtti.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/exceptions.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/stl.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/shared.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/warn_on.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/qt.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/thread.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/moc.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/windows.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/resources.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/uic.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/yacc.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/lex.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/include_source_dir.prf \
c:/QtSDK/Desktop/Qt/4.8.0/mingw/lib/qtmaind.prl
$(QMAKE) QMAKE_CC=C:/QtSDK/mingw/bin/gcc.exe QMAKE_CXX=C:/QtSDK/mingw/bin/g++.exe "QMAKE_CFLAGS=-g3 -gdwarf-2" "QMAKE_CXXFLAGS=-g3 -gdwarf-2" -o Makefile cs215pgm3.pro
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/qconfig.pri:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/modules/qt_webkit_version.pri:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/qt_functions.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/qt_config.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/exclusive_builds.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/default_pre.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/default_pre.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/debug.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/debug_and_release.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/default_post.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/default_post.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/rtti.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/exceptions.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/stl.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/shared.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/warn_on.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/qt.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/thread.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/moc.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/win32/windows.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/resources.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/uic.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/yacc.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/lex.prf:
c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/features/include_source_dir.prf:
c:\QtSDK\Desktop\Qt\4.8.0\mingw\lib\qtmaind.prl:
qmake: qmake_all FORCE
#$(QMAKE) QMAKE_CC=C:/QtSDK/mingw/bin/gcc.exe QMAKE_CXX=C:/QtSDK/mingw/bin/g++.exe "QMAKE_CFLAGS=-g3 -gdwarf-2" "QMAKE_CXXFLAGS=-g3 -gdwarf-2" -o Makefile cs215pgm3.pro
qmake_all: FORCE
make_default: debug-make_default release-make_default FORCE
make_first: debug-make_first release-make_first FORCE
all: debug-all release-all FORCE
clean: debug-clean release-clean FORCE
distclean: debug-distclean release-distclean FORCE
-$(DEL_FILE) Makefile
check: first
debug-mocclean: $(MAKEFILE).Debug
$(MAKE) -f $(MAKEFILE).Debug mocclean
release-mocclean: $(MAKEFILE).Release
$(MAKE) -f $(MAKEFILE).Release mocclean
mocclean: debug-mocclean release-mocclean
debug-mocables: $(MAKEFILE).Debug
$(MAKE) -f $(MAKEFILE).Debug mocables
release-mocables: $(MAKEFILE).Release
$(MAKE) -f $(MAKEFILE).Release mocables
mocables: debug-mocables release-mocables
FORCE:
$(MAKEFILE).Debug: Makefile
$(MAKEFILE).Release: Makefile
Compiling/Error Message:
/usr/bin/make -f Makefile.Debug
make[1]: Entering directory `/c/Users/Ben/Documents/CS 215/Programs/cs215Pgm3'
C:/QtSDK/mingw/bin/g++.exe -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -o debug/cardwidget.o cardwidget.cpp
C:/QtSDK/mingw/bin/g++.exe -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -o debug/cardwindow.o cardwindow.cpp
C:/QtSDK/mingw/bin/g++.exe -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -o debug/main.o main.cpp
C:/QtSDK/Desktop/Qt/4.8.0/mingw/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -D__GNUC__ -DWIN32 cardwindow.h -o debug/moc_cardwindow.cpp
C:/QtSDK/mingw/bin/g++.exe -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -o debug/moc_cardwindow.o debug/moc_cardwindow.cpp
C:/QtSDK/Desktop/Qt/4.8.0/mingw/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -D__GNUC__ -DWIN32 cardwidget.h -o debug/moc_cardwidget.cpp
C:/QtSDK/mingw/bin/g++.exe -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtCore' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/QtGui' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/include/ActiveQt' -I'debug' -I'c:/QtSDK/Desktop/Qt/4.8.0/mingw/mkspecs/default' -o debug/moc_cardwidget.o debug/moc_cardwidget.cpp
g++ -mthreads -Wl,-subsystem,windows -o debug/cs215pgm3.exe debug/cardwidget.o debug/cardwindow.o debug/cs215pgm3.o debug/main.o debug/moc_cardwindow.o debug/moc_cardwidget.o debug/qrc_cards.o -L'c:/QtSDK/Desktop/Qt/4.8.0/mingw/lib' -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
make[1]: Leaving directory `/c/Users/Ben/Documents/CS 215/Programs/cs215Pgm3'
debug/cs215pgm3.o: In function `Z12shuffleCardsv':
C:\Users\Ben\Documents\CS 215\Programs\cs215Pgm3/cs215pgm3.cpp:107: undefined reference to `CardDeck::ShuffleDeck()'
debug/cs215pgm3.o: In function `_static_initialization_and_destruction_0':
C:\Users\Ben\Documents\CS 215\Programs\cs215Pgm3/cs215pgm3.cpp:99: undefined reference to `CardDeck::CardDeck(int, int, int)'
collect2: ld returned 1 exit status
make[1]: *** [debug/cs215pgm3.exe] Error 1
make: *** [debug] Error 2
BUILD FAILED (exit value 2, total time: 9s)
Look at your compiler output the first few lines show you are compiling cardwidget.cpp, cardwindow.cpp and main.cpp. There is no corresponding line for CardDeck.cpp. (As well as what I assume are some mocked versions for unit testing). The make file you posted showed no references to these files. I am no make expert but I suspect the makefile you posted is including another file (possibly the MAKEFILE=Makefile) that you did not include. Look into your project files and see if you can find the file that is specifying the above files, typically as I remember Makefiles there should be something like
SOURCES =
or
SOURCES +=
and
HEADERS=
or
HEADERS +=
At any rate there HAS to be a reference to the source and header files by name so if you can search inside the content of files, find the one that has cardwidget.cpp and possibly cardwidget.h. Then see if you can modify that file to include CardDeck.cpp and CardDeck.h.
What you posted is so complex I suspect some file automated build tool is creating this for you and your development environment may have some other way for you to specify your new source and header files and then it updates the make files automatically. You need to read whatever documentation came with your compiler/build system. Failing that specify Exactly what build tools you are using and maybe someone experienced with those tools can help.