PDA

View Full Version : Non logical Errors - qmake



ahmhdy
15th June 2009, 22:27
Hi,

I'm trying to compile a project created on Qt 4.3.2 in a new Qt 4.5.1 without changing anything,

I use qmake or compile commands, and I get this error:


Running build steps for project RemoteController...
Configuration unchanged, skipping QMake step.
Starting: C:/Qt/2009.02/mingw/bin/mingw32-make.exe -w
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Entering directory `C:/Users/Ahmed Mahdy/Desktop/Project Code/Linux PC/Under Test/RemoteController/RemoteController'
c:\Qt\2009.02\qt\bin\qmake.exe -spec c:\Qt\2009.02\qt\mkspecs\win32-g++ -win32 CONFIG+=release -o Makefile RemoteController.pro
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Leaving directory `C:/Users/Ahmed Mahdy/Desktop/Project Code/Linux PC/Under Test/RemoteController/RemoteController'
mingw32-make.exe: Entering directory `C:/Users/Ahmed Mahdy/Desktop/Project Code/Linux PC/Under Test/RemoteController/RemoteController'
C:/Qt/2009.02/mingw/bin/mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `C:/Users/Ahmed Mahdy/Desktop/Project Code/Linux PC/Under Test/RemoteController/RemoteController'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2009.02\qt\include\QtCore" -I"c:\Qt\2009.02\qt\include\QtGui" -I"c:\Qt\2009.02\qt\include" -I"." -I"c:\Qt\2009.02\qt\include\ActiveQt" -I"release" -I"." -I"c:\Qt\2009.02\qt\mkspecs\win32-g++" -o release\ConnectionDialog.o ConnectionDialog.cpp
In file included from ConnectionDialog.cpp:4:
ConnectionDialog.h:4:24: QHostAddress: No such file or directory
In file included from ConnectionDialog.cpp:4:
ConnectionDialog.h:32: error: `QHostAddress' does not name a type
ConnectionDialog.cpp: In member function `bool ConnectionDialog::validateIPAddressFormat()':
ConnectionDialog.cpp:71: error: `IPAddress' undeclared (first use this function)
ConnectionDialog.cpp:71: error: (Each undeclared identifier is reported only once for each function it appears in.)
mingw32-make.exe[1]: Leaving directory `C:/Users/Ahmed Mahdy/Desktop/Project Code/Linux PC/Under Test/RemoteController/RemoteController'
mingw32-make.exe: Leaving directory `C:/Users/Ahmed Mahdy/Desktop/Project Code/Linux PC/Under Test/RemoteController/RemoteController'
mingw32-make.exe[1]: *** [release/ConnectionDialog.o] Error 1
mingw32-make.exe: *** [release] Error 2
Exited with code 2.
Error while building project RemoteController
When executing build step 'Make'

** In file included from ConnectionDialog.cpp:4: (points to: #include "ConnectionDialog.h")
** QHostAddress: No such file or directory (points to: #include <QHostAddress>)
** In file included from ConnectionDialog.cpp:4: (points to: #include "ConnectionDialog.h")
** 'QHostAddress' does not name a type (points to: QHostAddress IPAddress;)
** 'IPAddress' undeclared (first use this function)(points to: correct = IPAddress.setAddress(robotAddress);)
** (Each undeclared identifier is reported only once for each function it appears in.) (points to: correct = IPAddress.setAddress(robotAddress);)


This is unlogical because I'm sure that all erros are exsiting in the project.

Hopefully note that I'm compiling over Windows 7 RC. This application is originally is directed to Linux machine. When I try to compile it on Linux, Qt gives me error: make not found.

Please help!

Regards,
Ahmed

wysota
15th June 2009, 22:29
Add QT+=network to your qmake project file.

ahmhdy
16th June 2009, 01:21
That worked well, Now I got another sequence of errors related to the Qwt Widgets library.

I'm not sure how can I include Qwt files into the Qt source so that I can call it like any library. I've compiled it and put it into C:\Qwt

Can you please help in that?

Thanks,
Ahmed

wysota
16th June 2009, 09:47
Add LIBS += -LC:/Qwt -lqwt to the project file.

ahmhdy
17th June 2009, 20:56
That code didn't work! Still same errors


Running build steps for project RemoteController...
Starting: C:/Qt/2009.02/qt/bin/qmake.exe C:/Qt/Projects/RemoteController/RemoteController.pro -spec win32-g++ -r CONFIG+=release
Exited with code 0.
Starting: C:/Qt/2009.02/mingw/bin/mingw32-make.exe -w
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Entering directory `C:/Qt/Projects/RemoteController'
C:/Qt/2009.02/mingw/bin/mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `C:/Qt/Projects/RemoteController'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\2009.02\qt\include\QtCore" -I"..\..\2009.02\qt\include\QtGui" -I"..\..\2009.02\qt\include" -I"." -I"..\..\2009.02\qt\include\ActiveQt" -I"release" -I"." -I"..\..\2009.02\qt\mkspecs\win32-g++" -o release\gpsview.o gpsview.cpp
In file included from ImageView.h:10,
from ui_MainWindow.h:27,
from MainWindow.h:5,
from gpsview.cpp:5:
VideoFrameThread.h:4:21: QtNetwork: No such file or directory
In file included from ui_MainWindow.h:29,
from MainWindow.h:5,
from gpsview.cpp:5:
plotview.h:8:27: qwt_scale_map.h: No such file or directory
plotview.h:9:28: qwt_plot_curve.h: No such file or directory
plotview.h:10:24: qwt_symbol.h: No such file or directory
In file included from ui_MainWindow.h:29,
from MainWindow.h:5,
from gpsview.cpp:5:
plotview.h:35: error: `QwtPlotCurve' does not name a type
plotview.h:44: error: `QwtScaleMap' does not name a type
plotview.h:45: error: `QwtScaleMap' does not name a type
In file included from ui_MainWindow.h:30,
from MainWindow.h:5,
from gpsview.cpp:5:
sensorsview.h:42: error: `QwtPlotCurve' does not name a type
sensorsview.h:51: error: `QwtScaleMap' does not name a type
sensorsview.h:52: error: `QwtScaleMap' does not name a type
In file included from MainWindow.h:7,
from gpsview.cpp:5:
ConnectionDialog.h:4:24: QHostAddress: No such file or directory
In file included from MainWindow.h:7,
from gpsview.cpp:5:
ConnectionDialog.h:32: error: `QHostAddress' does not name a type
In file included from MainWindow.h:8,
from gpsview.cpp:5:
EyeCreateRobot.h:31: error: `QTcpSocket' does not name a type
In file included from gpsview.cpp:5:
MainWindow.h:10:25: qwt_compass.h: No such file or directory
MainWindow.h:11:30: qwt_compass_rose.h: No such file or directory
MainWindow.h:12:29: qwt_dial_needle.h: No such file or directory
In file included from gpsview.cpp:5:
MainWindow.h:16: error: expected class-name before '{' token
MainWindow.h: In constructor `QwtCompassNoMouse::QwtCompassNoMouse(QWidget*)':
MainWindow.h:19: error: class `QwtCompassNoMouse' does not have any field named `QwtCompass'
gpsview.h: In constructor `GPSView::GPSView(QWidget*)':
gpsview.h:72: warning: `GPSView::m_parent' will be initialized after
gpsview.h:69: warning: `GPSDataThread GPSView::m_thread'
gpsview.cpp:10: warning: when initialized here
gpsview.cpp: In member function `void GPSView::populateScene()':
gpsview.cpp:216: warning: converting to `int' from `float'
gpsview.cpp:217: warning: converting to `int' from `float'
gpsview.cpp: In member function `bool GPS_Path::getNextPoint(GPS_Point&)':
gpsview.cpp:277: warning: comparison between signed and unsigned integer expressions
mingw32-make.exe[1]: *** [release/gpsview.o] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Qt/Projects/RemoteController'
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Leaving directory `C:/Qt/Projects/RemoteController'
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: *** [release] Error 2
Exited with code 2.
Error while building project RemoteController
When executing build step 'Make'

wysota
18th June 2009, 16:20
Did you add Qwt to your project at all as stated in its docs?

ahmhdy
19th June 2009, 20:48
I don't know. Can you guide me?

wysota
19th June 2009, 22:11
Include qwtconfig.pri in your project.