Results 1 to 9 of 9

Thread: qmake and mingw trouble

  1. #1
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qmake and mingw trouble

    Hello All!

    I trying to build my first QT application, but the following errors occured:

    make -f Makefile.Release
    make[1]: Entering directory `/home/FirstApp'
    g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"D:/Qt/4.1.0/include/QtCore" -I"D:/Qt/4.1.0/include/QtGui" -I"D:/Qt/4.1.0/include" -I"." -I"D:/Qt/4.1.0/include/ActiveQt" -I"release" -I"." -I"D:/Qt/4.1.0/mkspecs/win32-g++" -o release\main.o main.cpp
    D:\Qt\4.1.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"D:/Qt/4.1.0/include/QtCore" -I"D:/Qt/4.1.0/include/QtGui" -I"D:/Qt/4.1.0/include" -I"." -I"D:/Qt/4.1.0/include/ActiveQt" -I"release" -I"." -I"D:/Qt/4.1.0/mkspecs/win32-g++" -D__GNUC__ -DWIN32 FirstAppMainWindow.h -o release\moc_FirstAppMainWindow.cpp
    /bin/sh.exe: D:Qt4.1.0binmoc.exe: command not found
    make[1]: *** [release\moc_FirstAppMainWindow.cpp] Error 127
    make[1]: Leaving directory `/home/FirstApp'
    make: *** [release] Error 2

    I use sequence of commands:
    qmake -project -win32 && qmake && make

    My build system is:
    * Current MinGW with gcc-3.4.2
    * Current qt-4.1.0 (for minGW)

    How can I solve this problem?

  2. #2
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and mingw trouble

    Hi maybe you can check your path.
    /bin/sh.exe: D:Qt4.1.0binmoc.exe: command not found
    This is what's raising the error.
    It is trying to execute a file named D:Qt4.1.0binmoc.exe and that not exists.
    It looks like you're missing the slashes on your env. vars.

    Can you show us how your %PATH% or $PATH looks?
    Kandalf
    There's no place like ~

  3. #3
    Join Date
    Jan 2006
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qmake and mingw trouble

    This is my $PATH

    .:/usr/local/bin:/mingw/bin:/bin:/c/Perl/bin/:/c/WINNT/system32:/c/WINNT:/c/WINNT/system32/wbem:/d/Qt/4.1.0/bin:/c/Program:/c/Vim/vim62

    QT installed in D:\Qt\4.1.0 (/d/Qt/4.1.0 in mingw)

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and mingw trouble

    Quote Originally Posted by krivenok
    This is my $PATH

    .:/usr/local/bin:/mingw/bin:/bin:/c/Perl/bin/:/c/WINNT/system32:/c/WINNT:/c/WINNT/system32/wbem:/d/Qt/4.1.0/bin:/c/Program:/c/Vim/vim62

    QT installed in D:\Qt\4.1.0 (/d/Qt/4.1.0 in mingw)
    Use cmd.exe instead of MSYS and make sure that PATH doesn't point to Cygwin binaries.

  5. #5
    Join Date
    Feb 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake and mingw trouble

    I had the same problem and using cmd.exe does work. However I have just gotten used to the msys environment and would like to keep on using it. Is there any other way around this?

  6. #6
    Join Date
    Feb 2006
    Location
    Kirovohrad, Ukraine
    Posts
    72
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and mingw trouble

    Try this way:

    $ export QTDIR=/d/Qt/4.1.0
    $ qmake -project
    $ qmake
    $ make

  7. #7
    Join Date
    Feb 2006
    Location
    Kirovohrad, Ukraine
    Posts
    72
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Cool Re: qmake and mingw trouble

    Quote Originally Posted by Cesar
    Try this way:

    $ export QTDIR=/d/Qt/4.1.0
    $ qmake -project
    $ qmake
    $ make
    Hmm... This is not quite right! It works this way if you don't use moc in the project.
    Some digging in $QTDIR/mkspecs/$QMAKESPEC/qmake.conf gives the solution:

    $ export MINGW_IN_SHELL=1
    $ export QTDIR=/d/Qt/4.1.0
    $ qmake -project
    $ qmake
    $ make

    It work's fine for me!

  8. #8
    Join Date
    Feb 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake and mingw trouble

    Thanks. It works just fine.

  9. #9
    Join Date
    Nov 2008
    Posts
    33
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and mingw trouble

    Quote Originally Posted by Cesar View Post
    Hmm... This is not quite right! It works this way if you don't use moc in the project.
    Some digging in $QTDIR/mkspecs/$QMAKESPEC/qmake.conf gives the solution:

    $ export MINGW_IN_SHELL=1
    $ export QTDIR=/d/Qt/4.1.0
    $ qmake -project
    $ qmake
    $ make

    It work's fine for me!
    The problem with moc is still there though...

Similar Threads

  1. Qt 4.3.1 & MinGW 5.1.3 & MSYS 1.0 qmake problem
    By mdecandia in forum Installation and Deployment
    Replies: 2
    Last Post: 2nd October 2008, 16:52
  2. qmake with mingw
    By john_god in forum Newbie
    Replies: 5
    Last Post: 13th September 2008, 13:01
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.