Important: Please read the Qt Code of Conduct -

Compiling Error mingw-make on eclipse QT C++ on Windows 7

  • Hello Guys,

    after a few hours hard work my eclipse can compile c++ programms. After a few more hours hard work my QT Framework plugin for eclipse is also almost working.

    I tried to compile a empty project with only a main cpp:
    @#include <QtCore>
    #include <QCoreApplication>

    int main(int argc, char *argv[])
    QCoreApplication a(argc, argv);

    return a.exec&#40;&#41;;


    and get these errors on my console:
    bq. bq. 18:17:43 **** Build of project test ****
    mingw32-make debug
    mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory D:/Entwicklung/SmartBlue/test' g++ -c -g -Wall -Wextra -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I"c:\Qt\4.8.3\include\QtCore" -I"c:\Qt\4.8.3\include\QtGui" -I"c:\Qt\4.8.3\include\Qt3Support" -I"c:\Qt\4.8.3\include" -I"c:\Qt\4.8.3\include\ActiveQt" -I"debug" -I"c:\Qt\4.8.3\mkspecs\default" -o debug\main.o main.cpp Der Befehl "g++" ist entweder falsch geschrieben oder mingw32-make[1]: Leaving directoryD:/Entwicklung/SmartBlue/test'
    konnte nicht gefunden werden.
    mingw32-make[1]: *** [debug/main.o] Error 1
    mingw32-make: *** [debug] Error 2

    18:17:44 Build Finished (took 490ms)

    and these as a pop-up window:
    Variable references non-existent resource : ${workspace_loc:/helloworld/main.cpp}

    I have installed the latest version of mingw. Also my pathfile is setted to the bin file of mingw. In the bin file is also the mingw32-make.

    I think my properties for the c++ build is not correct. Can somebody help me how to configure it ?!

    PLEASEEEEEEEEEEEE !!!!!!!!!!!!!!!!!!!!!!!!!!!

  • hi,

    set path variable like this:


    add this MINGW to the 'common' path variable like this:
    path ....;%MINGW%

    certainly you know how to set environment variables in windows ;-)
    open cmd and enter 'gcc -v'

    good luck!

  • I know how to set the envirent variables for windows. Thats no problem for me :-)

    I dindt understood these thing with common ile. What do you mean with add this to the common path variable like this ?! Could you please be a little more detailed ?!

  • And for what stands the command gcc - v ?!

  • Now I get these following Error:
    c:\Qt\4.8.3\include/QtCore/../../src/corelib/global/qglobal.h:45:20: fatal error: stddef.h: No such file or directory

    Snapshot of my Console:
    @09:31:53 **** Build of project test ****
    mingw32-make.exe debug
    mingw32-make.exe -f Makefile.Debug
    mingw32-make.exe[1]: Entering directory D:/Entwicklung/SmartBlue/test' g++ -c -g -Wall -Wextra -fno-exceptions -fno-rtti -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_NO_DYNAMIC_CAST -I"c:\Qt\4.8.3\include\QtCore" -I"c:\Qt\4.8.3\include\QtGui" -I"c:\Qt\4.8.3\include\Qt3Support" -I"c:\Qt\4.8.3\include" -I"c:\Qt\4.8.3\include\ActiveQt" -I"debug" -I"c:\Qt\4.8.3\mkspecs\default" -o debug\main.o main.cpp In file included from c:\Qt\4.8.3\include/QtCore/qglobal.h:1:0, from c:\Qt\4.8.3\include/QtCore/../../src/corelib/global/qnamespace.h:45, from c:\Qt\4.8.3\include/QtCore/qnamespace.h:1, from c:\Qt\4.8.3\include/QtCore/../../src/corelib/kernel/qobjectdefs.h:45, mingw32-make.exe[1]: Leaving directoryD:/Entwicklung/SmartBlue/test'
    from c:\Qt\4.8.3\include/QtCore/qobjectdefs.h:1,
    from c:\Qt\4.8.3\include/QtCore/../../src/corelib/kernel/qobject.h:47,
    from c:\Qt\4.8.3\include/QtCore/qobject.h:1,
    from c:\Qt\4.8.3\include\QtCore/../../src/corelib/kernel/qabstracteventdispatcher.h:45,
    from c:\Qt\4.8.3\include\QtCore/qabstracteventdispatcher.h:1,
    from c:\Qt\4.8.3\include\QtCore/QtCore:3,
    from main.cpp:1:
    c:\Qt\4.8.3\include/QtCore/../../src/corelib/global/qglobal.h:45:20: fatal error: stddef.h: No such file or directory
    compilation terminated.
    mingw32-make.exe[1]: *** [debug/main.o] Error 1
    mingw32-make.exe: *** [debug] Error 2

    09:31:55 Build Finished (took 1s.842ms)@

Log in to reply