Hi!
I have a project developed in Qt 4.8 for Embedded Linux and Linux that compiles fine. Now I'm trying to compile it in Qt 5.5.1 in Windows 7 and I got a problem I'm being unable to solve: each time I try to compile it, I get the error
C:\Qt\Qt5.5\5.5\mingw492_32\bin\uic.exe interface\dialogs\alphanumerickeyboard.ui -o build\uis\ui_alphanumerickeyboard.h
g++ -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DV_SERGIPETECH_0=0x100 -DV_SERGIPETECH_1=0x101 -DV_UNILA_0=0x110 -DGENERAL_VERSION_NUMBER=V_UNILA_0 -DAPP_VERSION=\"\" -DMAIN_CLOCK=1000 -DSCREENSAVER_SIMPLE_MODE -DCENTER_CONTROLLER -DPERIODIC_WIDGETS_UPDATE -DSAVE_ENTIRE_PQ -DDEFAULT_THEME_PATH='"D:/Desenvolvimento/RE8000SW/src/trunk/main_projects/interface/re8k_interface/../../..\main_projects\interface\theme"' -DDEFAULT_DATA_PATH='"D:/Desenvolvimento/RE8000SW/src/trunk/main_projects/interface/re8k_interface/../../..\main_projects\interface\data"' -DDEFAULT_TRANSLATION_PATH='"D:/Desenvolvimento/RE8000SW/src/trunk/main_projects/interface/re8k_interface/../../../main_projects/interface/translations"' -DDEFAULT_SCREENSHOT_PATH='"C:\Users\Administrador\Imagens\screenshots"' -DDEFAULT_RECORD_DIR='"C:\Users\Administrador\Documentos\TEMP\LogsRE8000"' -DDEFAULT_PENDRIVE_DIR='"C:\Users\Administrador\Documentos\TEMP\PendriveRE8000"' -DDEFAULT_VERSION_FILE_PATH='"C:\Users\Administrador\Documentos\TEMP\version.info"' -DCALIBRATION_FILE='"C:\Users\Administrador\Documentos\TEMP\caltouchpoints"' -DDEFAULT_ETC_PATH='"C:\Users\Administrador\Documentos\TEMP"' -DDESKTOP -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN qtextension/qcycleimagebutton.cpp -o qtextension/QCycleImageButton
In file included from qtextension/qcycleimagebutton.cpp:1:0:
qtextension/qcycleimagebutton.hpp:4:19: fatal error: QObject: No such file or directory
#include <QObject>
^
compilation terminated.
C:\Qt\Qt5.5\5.5\mingw492_32\bin\uic.exe interface\dialogs\alphanumerickeyboard.ui -o build\uis\ui_alphanumerickeyboard.h
g++ -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DV_SERGIPETECH_0=0x100 -DV_SERGIPETECH_1=0x101 -DV_UNILA_0=0x110 -DGENERAL_VERSION_NUMBER=V_UNILA_0 -DAPP_VERSION=\"\" -DMAIN_CLOCK=1000 -DSCREENSAVER_SIMPLE_MODE -DCENTER_CONTROLLER -DPERIODIC_WIDGETS_UPDATE -DSAVE_ENTIRE_PQ -DDEFAULT_THEME_PATH='"D:/Desenvolvimento/RE8000SW/src/trunk/main_projects/interface/re8k_interface/../../..\main_projects\interface\theme"' -DDEFAULT_DATA_PATH='"D:/Desenvolvimento/RE8000SW/src/trunk/main_projects/interface/re8k_interface/../../..\main_projects\interface\data"' -DDEFAULT_TRANSLATION_PATH='"D:/Desenvolvimento/RE8000SW/src/trunk/main_projects/interface/re8k_interface/../../../main_projects/interface/translations"' -DDEFAULT_SCREENSHOT_PATH='"C:\Users\Administrador\Imagens\screenshots"' -DDEFAULT_RECORD_DIR='"C:\Users\Administrador\Documentos\TEMP\LogsRE8000"' -DDEFAULT_PENDRIVE_DIR='"C:\Users\Administrador\Documentos\TEMP\PendriveRE8000"' -DDEFAULT_VERSION_FILE_PATH='"C:\Users\Administrador\Documentos\TEMP\version.info"' -DCALIBRATION_FILE='"C:\Users\Administrador\Documentos\TEMP\caltouchpoints"' -DDEFAULT_ETC_PATH='"C:\Users\Administrador\Documentos\TEMP"' -DDESKTOP -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN qtextension/qcycleimagebutton.cpp -o qtextension/QCycleImageButton
In file included from qtextension/qcycleimagebutton.cpp:1:0:
qtextension/qcycleimagebutton.hpp:4:19: fatal error: QObject: No such file or directory
#include <QObject>
^
compilation terminated.
To copy to clipboard, switch view to plain text mode
for the same file, which starts as such:
#ifndef QCYCLEIMAGEBUTTON_H_
#define QCYCLEIMAGEBUTTON_H_
#include <QObject>
#include <QAbstractButton>
#ifdef DESKTOP
#include <QtDesigner/QDesignerExportWidget>
#else
#define QDESIGNER_WIDGET_EXPORT
#endif
#include "interfaceglobal.hpp"
class QImageButtonIllustration;
class QImageSliderIllustration;
typedef qint32 button_id;
{
Q_OBJECT
#ifndef QCYCLEIMAGEBUTTON_H_
#define QCYCLEIMAGEBUTTON_H_
#include <QObject>
#include <QAbstractButton>
#ifdef DESKTOP
#include <QtDesigner/QDesignerExportWidget>
#else
#define QDESIGNER_WIDGET_EXPORT
#endif
#include "interfaceglobal.hpp"
class QLabel;
class QImageButtonIllustration;
class QImageSliderIllustration;
typedef qint32 button_id;
class QDESIGNER_WIDGET_EXPORT QCycleImageButton : public QAbstractButton
{
Q_OBJECT
To copy to clipboard, switch view to plain text mode
I can assure the Qt installation went OK since I created a QWidgets project and it compiled fine. I also checked if there was anything special in the Projects configuration but I couldn't find any problems there.
I also tried to find solutions to this problem on the web, but nothing helpful was found. Here is my .pro file as for now (minus the .hpp and .cpp includes):
QT += core gui xml network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
#CONFIG += qwt
#CONFIG += qwtpolar
RE8K_REPO = $${PWD}/../../..
RE8K_COMMON = $${RE8K_REPO}/common
RE8K_SDCARD = $${RE8K_REPO}/../../sdcard_files/defaultFiles
RE8K_TRANSLATION = $${RE8K_REPO}/main_projects/interface/translations
VERSION = $$system(svn info -r HEAD . | grep 'Changed\ Rev' | cut -b 19-)
DEFINES += "GENERAL_VERSION_NUMBER=V_UNILA_0"
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
#DEFINES += CLASSE_A_TEST
#DEFINES += INTERFACE_DEMO #Special for the demo version
DEFINES += MAIN_CLOCK=1000
DEFINES += SCREENSAVER_SIMPLE_MODE
#DEFINES += DATASTREAM_THREAD
DEFINES += CENTER_CONTROLLER
DEFINES += PERIODIC_WIDGETS_UPDATE #Enable update by 1 sec of all top level widgets to counter black screen bug
DEFINES += SAVE_ENTIRE_PQ #When selecting one item of a Physical Quantity makes all items be saved in a record
#DEFINES += SAVE_XML_TEST
#DEFINES += XML_WITH_COMMENTS
#DEFINES += RELEASE_VERSION
#DEFINES USE_FULL_CURRENT_RANGE_CONFIG #Enables current range of all 4 channels
INCLUDEPATH += $${RE8K_COMMON}/include
INCLUDEPATH += qtextension
LIBS += -L$${RE8K_COMMON}/lib #needed for hal, etc.
LIBS += -lQDeviceWatcher
CONFIG(debug, debug|release) {
LIBS += -lmLoggerd
}
CONFIG(release, debug|release) {
LIBS += -lmLogger
}
win32 {
DEFINES += 'DEFAULT_THEME_PATH=\'\"$${RE8K_REPO}\main_projects\interface\theme\"\''
DEFINES += 'DEFAULT_DATA_PATH=\'\"$${RE8K_REPO}\main_projects\interface\data\"\''
DEFINES += 'DEFAULT_TRANSLATION_PATH=\'\"$${RE8K_TRANSLATION}\"\''
DEFINES += 'DEFAULT_SCREENSHOT_PATH=\'\"C:\Users\Administrador\Imagens\screenshots\"\''
DEFINES += 'DEFAULT_RECORD_DIR=\'\"C:\Users\Administrador\Documentos\TEMP\LogsRE8000\"\''
DEFINES += 'DEFAULT_PENDRIVE_DIR=\'\"C:\Users\Administrador\Documentos\TEMP\PendriveRE8000\"\''
DEFINES += 'DEFAULT_VERSION_FILE_PATH=\'\"C:\Users\Administrador\Documentos\TEMP\version.info\"\''
DEFINES += 'CALIBRATION_FILE=\'\"C:\Users\Administrador\Documentos\TEMP\caltouchpoints\"\''
DEFINES += 'DEFAULT_ETC_PATH=\'\"C:\Users\Administrador\Documentos\TEMP\"\''
DEFINES += DESKTOP
INCLUDEPATH += C:\Qt\Qwt-6.1.2\include
INCLUDEPATH += C:\Qt\QwtPolar-1.1.1\include
INCLUDEPATH += ..\..\..\third_party\mLogger\src
INCLUDEPATH += ..\..\..\third_party\QDeviceWatcher\src
LIBS += -LC:\Qt\Qwt-6.1.2\lib
LIBS += -LC:\Qt\QwtPolar-1.1.1\lib
TARGET = name_here
}
QT += core gui xml network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
#CONFIG += qwt
#CONFIG += qwtpolar
RE8K_REPO = $${PWD}/../../..
RE8K_COMMON = $${RE8K_REPO}/common
RE8K_SDCARD = $${RE8K_REPO}/../../sdcard_files/defaultFiles
RE8K_TRANSLATION = $${RE8K_REPO}/main_projects/interface/translations
VERSION = $$system(svn info -r HEAD . | grep 'Changed\ Rev' | cut -b 19-)
DEFINES += "GENERAL_VERSION_NUMBER=V_UNILA_0"
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
#DEFINES += CLASSE_A_TEST
#DEFINES += INTERFACE_DEMO #Special for the demo version
DEFINES += MAIN_CLOCK=1000
DEFINES += SCREENSAVER_SIMPLE_MODE
#DEFINES += DATASTREAM_THREAD
DEFINES += CENTER_CONTROLLER
DEFINES += PERIODIC_WIDGETS_UPDATE #Enable update by 1 sec of all top level widgets to counter black screen bug
DEFINES += SAVE_ENTIRE_PQ #When selecting one item of a Physical Quantity makes all items be saved in a record
#DEFINES += SAVE_XML_TEST
#DEFINES += XML_WITH_COMMENTS
#DEFINES += RELEASE_VERSION
#DEFINES USE_FULL_CURRENT_RANGE_CONFIG #Enables current range of all 4 channels
INCLUDEPATH += $${RE8K_COMMON}/include
INCLUDEPATH += qtextension
LIBS += -L$${RE8K_COMMON}/lib #needed for hal, etc.
LIBS += -lQDeviceWatcher
CONFIG(debug, debug|release) {
LIBS += -lmLoggerd
}
CONFIG(release, debug|release) {
LIBS += -lmLogger
}
win32 {
DEFINES += 'DEFAULT_THEME_PATH=\'\"$${RE8K_REPO}\main_projects\interface\theme\"\''
DEFINES += 'DEFAULT_DATA_PATH=\'\"$${RE8K_REPO}\main_projects\interface\data\"\''
DEFINES += 'DEFAULT_TRANSLATION_PATH=\'\"$${RE8K_TRANSLATION}\"\''
DEFINES += 'DEFAULT_SCREENSHOT_PATH=\'\"C:\Users\Administrador\Imagens\screenshots\"\''
DEFINES += 'DEFAULT_RECORD_DIR=\'\"C:\Users\Administrador\Documentos\TEMP\LogsRE8000\"\''
DEFINES += 'DEFAULT_PENDRIVE_DIR=\'\"C:\Users\Administrador\Documentos\TEMP\PendriveRE8000\"\''
DEFINES += 'DEFAULT_VERSION_FILE_PATH=\'\"C:\Users\Administrador\Documentos\TEMP\version.info\"\''
DEFINES += 'CALIBRATION_FILE=\'\"C:\Users\Administrador\Documentos\TEMP\caltouchpoints\"\''
DEFINES += 'DEFAULT_ETC_PATH=\'\"C:\Users\Administrador\Documentos\TEMP\"\''
DEFINES += DESKTOP
INCLUDEPATH += C:\Qt\Qwt-6.1.2\include
INCLUDEPATH += C:\Qt\QwtPolar-1.1.1\include
INCLUDEPATH += ..\..\..\third_party\mLogger\src
INCLUDEPATH += ..\..\..\third_party\QDeviceWatcher\src
LIBS += -LC:\Qt\Qwt-6.1.2\lib
LIBS += -LC:\Qt\QwtPolar-1.1.1\lib
TARGET = name_here
}
To copy to clipboard, switch view to plain text mode
Any help appreciated.
Bookmarks