slux
7th January 2008, 18:51
Hi! i have a problem with my application.
if i compile with 'release' config, the qDebug messagess are showed on linux snderr... so, if i insert QT_NO_DEBUG_OUTPUT i have compiling errors:
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4/mkspecs/linux-g++ -I. -I/opt/qt4/include/QtCore -I/opt/qt4/include/QtCore -I/opt/qt4/include/QtNetwork -I/opt/qt4/include/QtNetwork -I/opt/qt4/include/QtGui -I/opt/qt4/include/QtGui -I/opt/qt4/include/QtXml -I/opt/qt4/include/QtXml -I/opt/qt4/include -I. -Isrc -Isrc/ui -Ibuild/moc -Ibuild/ui -o build/obj/Authenticator.o src/Authenticator.cpp
/opt/qt4/include/QtCore/qdebug.h:113: error: expected unqualified-id before ‘if’
/opt/qt4/include/QtCore/qdebug.h:113: error: expected unqualified-id before ‘else’
/opt/qt4/include/QtCore/qglobal.h: In member function ‘void Authenticator::authMySelf()’:
/opt/qt4/include/QtCore/qglobal.h:1257: error: too few arguments to function ‘void qWarning(const char*, ...)’
src/Authenticator.cpp:67: error: at this point in file
src/Authenticator.cpp: In member function ‘bool Authenticator::isConnected()’:
src/Authenticator.cpp:295: error: expected primary-expression before ‘if’
src/Authenticator.cpp:295: error: expected `:' before ‘if’
src/Authenticator.cpp:295: error: expected primary-expression before ‘if’
src/Authenticator.cpp:295: error: expected `;' before ‘if’
src/Authenticator.cpp:295: error: expected primary-expression before ‘else’
src/Authenticator.cpp:295: error: expected `;' before ‘else’
src/Authenticator.cpp:295: error: expected primary-expression before ‘else’
src/Authenticator.cpp:295: error: expected `;' before ‘else’
src/Authenticator.cpp:331: error: expected primary-expression before ‘if’
src/Authenticator.cpp:331: error: expected `:' before ‘if’
src/Authenticator.cpp:331: error: expected primary-expression before ‘if’
src/Authenticator.cpp:331: error: expected `;' before ‘if’
src/Authenticator.cpp:331: error: expected primary-expression before ‘else’
src/Authenticator.cpp:331: error: expected `;' before ‘else’
src/Authenticator.cpp:331: error: expected primary-expression before ‘else’
src/Authenticator.cpp:331: error: expected `;' before ‘else’
make: *** [build/obj/Authenticator.o] Error 1
my .pro file is this:
TEMPLATE = app
TARGET = qrm3wifi
DEPENDPATH += . src ui
INCLUDEPATH += . src src/ui
HEADERS += src/Authenticator.h \
src/Qrm3Controller.h \
src/SettingsExpert.h \
.......................................
src/AliveCommand.h \
src/SettingsGlobalResource.h
FORMS += ui/mainGui.ui
SOURCES += src/Authenticator.cpp \
src/Qrm3Controller.cpp \
src/SettingsExpert.cpp \
..............................................
src/AliveCommand.cpp
QT += network xml
DESTDIR = bin
MOC_DIR = build/moc
RCC_DIR = build/rcc
UI_DIR = build/ui
OBJECTS_DIR = build/obj
RESOURCES = resources/qrm3wifi.qrc
CONFIG += release
DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
the chunk of code is here:
qWarning() << "Server response with a non 200 Http state.";
and
(isConnectedHost1)? qDebug() << "Reachable" : qDebug() << "NOT Reachable";
/**
* Check if yahoo italy is reachable
*/
if (!socket2.waitForConnected(CONN_TIMEOUT))
......
please, help me! :eek:
if i compile with 'release' config, the qDebug messagess are showed on linux snderr... so, if i insert QT_NO_DEBUG_OUTPUT i have compiling errors:
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt4/mkspecs/linux-g++ -I. -I/opt/qt4/include/QtCore -I/opt/qt4/include/QtCore -I/opt/qt4/include/QtNetwork -I/opt/qt4/include/QtNetwork -I/opt/qt4/include/QtGui -I/opt/qt4/include/QtGui -I/opt/qt4/include/QtXml -I/opt/qt4/include/QtXml -I/opt/qt4/include -I. -Isrc -Isrc/ui -Ibuild/moc -Ibuild/ui -o build/obj/Authenticator.o src/Authenticator.cpp
/opt/qt4/include/QtCore/qdebug.h:113: error: expected unqualified-id before ‘if’
/opt/qt4/include/QtCore/qdebug.h:113: error: expected unqualified-id before ‘else’
/opt/qt4/include/QtCore/qglobal.h: In member function ‘void Authenticator::authMySelf()’:
/opt/qt4/include/QtCore/qglobal.h:1257: error: too few arguments to function ‘void qWarning(const char*, ...)’
src/Authenticator.cpp:67: error: at this point in file
src/Authenticator.cpp: In member function ‘bool Authenticator::isConnected()’:
src/Authenticator.cpp:295: error: expected primary-expression before ‘if’
src/Authenticator.cpp:295: error: expected `:' before ‘if’
src/Authenticator.cpp:295: error: expected primary-expression before ‘if’
src/Authenticator.cpp:295: error: expected `;' before ‘if’
src/Authenticator.cpp:295: error: expected primary-expression before ‘else’
src/Authenticator.cpp:295: error: expected `;' before ‘else’
src/Authenticator.cpp:295: error: expected primary-expression before ‘else’
src/Authenticator.cpp:295: error: expected `;' before ‘else’
src/Authenticator.cpp:331: error: expected primary-expression before ‘if’
src/Authenticator.cpp:331: error: expected `:' before ‘if’
src/Authenticator.cpp:331: error: expected primary-expression before ‘if’
src/Authenticator.cpp:331: error: expected `;' before ‘if’
src/Authenticator.cpp:331: error: expected primary-expression before ‘else’
src/Authenticator.cpp:331: error: expected `;' before ‘else’
src/Authenticator.cpp:331: error: expected primary-expression before ‘else’
src/Authenticator.cpp:331: error: expected `;' before ‘else’
make: *** [build/obj/Authenticator.o] Error 1
my .pro file is this:
TEMPLATE = app
TARGET = qrm3wifi
DEPENDPATH += . src ui
INCLUDEPATH += . src src/ui
HEADERS += src/Authenticator.h \
src/Qrm3Controller.h \
src/SettingsExpert.h \
.......................................
src/AliveCommand.h \
src/SettingsGlobalResource.h
FORMS += ui/mainGui.ui
SOURCES += src/Authenticator.cpp \
src/Qrm3Controller.cpp \
src/SettingsExpert.cpp \
..............................................
src/AliveCommand.cpp
QT += network xml
DESTDIR = bin
MOC_DIR = build/moc
RCC_DIR = build/rcc
UI_DIR = build/ui
OBJECTS_DIR = build/obj
RESOURCES = resources/qrm3wifi.qrc
CONFIG += release
DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
the chunk of code is here:
qWarning() << "Server response with a non 200 Http state.";
and
(isConnectedHost1)? qDebug() << "Reachable" : qDebug() << "NOT Reachable";
/**
* Check if yahoo italy is reachable
*/
if (!socket2.waitForConnected(CONN_TIMEOUT))
......
please, help me! :eek: