Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

QtWorkbench plugin

<< < (11/44) > >>

mandrav:

--- Quote ---what gcc version are you using ?
do you get these warnings from Qt or also from wxWidgets headers ?

--- End quote ---

gcc-3.4.4 with wxWidgets 2.6.2.

mandrav:

--- Quote from: http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Warning-Options.html ----Wextra
    (This option used to be called -W. The older name is still supported, but the newer name is more descriptive.)
--- End quote ---

Now, that explains why I got confused :P

tiwag:
this is what i get when i build a simple hello world QtApp


--- Code: ---#include <qstring.h>
#include <qapplication.h>
#include <qpushbutton.h>

int main(int argc, char **argv)
{
    QApplication    app(argc, argv);
    QPushButton     quit("Hello World!");
   
    quit.resize(300, 40);
    quit.setFont(QFont("Arial", 18, QFont::Bold));
    QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));
    quit.show();
   
    return app.exec();
}

--- End code ---


these tons of warnings are very annoying


--- Code: ---mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `D:/Devel/_projects/Qt/qt2'
g++ -c -Wall -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NEEDS_QMAIN -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"D:/qt412/include/QtCore" -I"D:/qt412/include/QtGui" -I"D:/qt412/include" -I"D:/MinGW/include" -I"D:/Qt412/include" -I"D:/Qt412/include/ActiveQt" -I"D:/Qt412/include/Qt" -I"D:/Qt412/include/Qt3Support" -I"D:/Qt412/include/QtAssistant" -I"D:/Qt412/include/QtCore" -I"D:/Qt412/include/QtDesigner" -I"D:/Qt412/include/QtGui" -I"D:/Qt412/include/QtNetwork" -I"D:/Qt412/include/QtOpenGL" -I"D:/Qt412/include/QtSql" -I"D:/Qt412/include/QtSvg" -I"D:/Qt412/include/QtTest" -I"D:/Qt412/include/QtUiTools" -I"D:/Qt412/include/QtXml" -I"D:/qt412/include/ActiveQt" -I"release" -I"." -I"D:/qt412/mkspecs/win32-g++" -o .objs\main.o main.cpp
In file included from D:/qt412/include/QtCore/qrect.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/painting/qpaintdevice.h:28,
                 from D:/qt412/include/QtGui/qpaintdevice.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qpixmap.h:27,
                 from D:/qt412/include/QtGui/qpixmap.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qicon.h:29,
                 from D:/qt412/include/QtGui/qicon.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qabstractbutton.h:27,
                 from D:/qt412/include/QtGui/qabstractbutton.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qpushbutton.h:27,
                 from D:/qt412/include/QtGui/qpushbutton.h:1,
                 from main.cpp:3:
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:138: warning: inline function `bool operator==(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:139: warning: inline function `bool operator!=(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:166: warning: inline function `bool operator==(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:167: warning: inline function `bool operator!=(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:560: warning: inline function `bool operator==(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:561: warning: inline function `bool operator!=(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:573: warning: inline function `bool operator==(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:574: warning: inline function `bool operator!=(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
In file included from D:/qt412/include/QtGui/qrgb.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/painting/qcolor.h:27,
                 from D:/qt412/include/QtGui/qcolor.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qpixmap.h:28,
                 from D:/qt412/include/QtGui/qpixmap.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qicon.h:29,
                 from D:/qt412/include/QtGui/qicon.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qabstractbutton.h:27,
                 from D:/qt412/include/QtGui/qabstractbutton.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qpushbutton.h:27,
                 from D:/qt412/include/QtGui/qpushbutton.h:1,
                 from main.cpp:3:
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:36: warning: inline function `int qRed(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:39: warning: inline function `int qGreen(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:42: warning: inline function `int qBlue(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:45: warning: inline function `int qAlpha(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:48: warning: inline function `QRgb qRgb(int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:51: warning: inline function `QRgb qRgba(int, int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:54: warning: inline function `int qGray(int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:60: warning: inline function `bool qIsGray(QRgb)' declared as dllimport: attribute ignored
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "qtapp.exe" .objs\main.o  -L"D:\MinGW\lib" -L"D:\Qt412\lib" -L"D:\qt412\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
mingw32-make.exe[1]: Leaving directory `D:/Devel/_projects/Qt/qt2'
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 17 warnings

--- End code ---


using gcc 3.4.5, the warning level switches -W, -Wall etc. don't change anything ...

i'm looking for a way to suppress this single warning while all other warnings keep alive ...

maybe anyone had solved this puzzle already

tiwag:
the same code from above sample

compiled with gcc 3.4.4 with warnings switch -W gives 764 warnings !!!

--- Code: ---Process terminated with status 0 (0 minutes, 18 seconds)
0 errors, 764 warnings

--- End code ---

compiled with gcc 3.4.4 with warnings switch -Wall gives 0 warnings (as Yiannis said)

yop:

--- Quote from: briahn06 on April 13, 2006, 07:51:33 am ---Is there anyway to link moc and uic?  I went to the QTWorkBench options, but only found intermediate folders.  This made me think that moc and uic ran by default (whenever necessary), but that doesn't seem to be the case b/c I get errors that are quelled when I run uic and moc manually from cmd.

Thanks, Brian.

--- End quote ---
Depends on what your trying to do and how you want to handle ui files. If you want them to pass through the uic then just add them to your codeblocks project and they are added to your .pro file in the FORMS field.


--- Quote from: tiwag on April 13, 2006, 10:30:52 am ---the same code from above sample

compiled with gcc 3.4.4 with warnings switch -W gives 764 warnings !!!

--- Code: ---Process terminated with status 0 (0 minutes, 18 seconds)
0 errors, 764 warnings

--- End code ---

compiled with gcc 3.4.4 with warnings switch -Wall gives 0 warnings (as Yiannis said)



--- End quote ---
Seems you 're not alone:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version