Results 1 to 20 of 30

Thread: Qt4 -vs6-w2k

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Angry Qt4 -vs6-w2k

    I'm having a problem creating the Hello World example.


    I installed the windows OpenSource version of QT 4.2.1. Having done so I could not get (Build Debug Libraries). On one of the QT forums someone suggested that if I installed mingw32-make-3.80.0-3 seperately that that would solve the problem. It did. I was able to build the debug libraries. (I mention this so that you will know how I got to where I am)

    Assuming the install was working correctly I started my introduction to QT by working with the examples. I typed in the infamous 'Hello World' examle, changed to the helloWorld directory, and tried to compile it.

    /* hello.pro my version using excerpts from the docs */

    qmake -win32 -makefile -hello.pro
    qmake

    qmake generates a Makefile.Debug and a Makefile.Release file but no executable.

    Then I tried:

    qmake -project
    qmake -win32 -makefile -helloWorld.pro /*QT's version of the helloWorld.pro file*/
    qmake

    Outcome was the same

    I noticed some examples here that also used make so I tried 'make'. I received the following error.

    C:\QT\projects\helloWorld>make
    mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/QT/projects/helloWorld'
    g++ -c -g -g -Wall -frtti -fexceptions -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL
    -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.2.1/
    include/QtCore" -I"C:/Qt/4.2.1/include/QtCore" -I"C:/Qt/4.2.1/include/QtGui" -I"
    C:/Qt/4.2.1/include/QtGui" -I"C:/Qt/4.2.1/include" -I"C:/Qt/4.2.1/include/Active
    Qt" -I"debug" -I"." -I"..\..\..\Qt\4.2.1\mkspecs\win32-g++" -o debug\main.o main
    .cpp
    'g++' is not recognized as an internal or external command,
    operable program or batch file.
    mingw32-make[1]: *** [debug\main.o] Error 1
    mingw32-make[1]: Leaving directory `C:/QT/projects/helloWorld'
    mingw32-make: *** [debug] Error 2


    Does anyone have any idea what I need to do here? After four days of configuring, searching docs and forums I'm about ready to delete QT and write it off as a bad experience.
    Last edited by dKoder; 2nd November 2006 at 20:07.

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    qmake generates a Makefile.Debug and a Makefile.Release file but no executable.
    Now you should run make (MinGW calls it mingw32-make) to compile your application. qmake is only a tool that generates makefiles.

  3. #3
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 -vs6-w2k

    I tried ming32-make and received the following message. Is there some other part of ming.* I need to install?

    C:\QT\projects\helloWorld>ming32-make
    'ming32-make' is not recognized as an internal or external command,
    operable program or batch file.

    Thanks for the quick reply.

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    'g++' is not recognized as an internal or external command,
    operable program or batch file.
    It looks like MinGW wasn't installed or configured properly. Check your environment variables.

    Do you use "Qt 4.x.x Command Prompt" (Start -> Qt by Trolltech v4.x.x (OpenSource) -> Qt 4.x.x Command Prompt)?

    Quote Originally Posted by dKoder View Post
    I'm about ready to delete QT and write it off as a bad experience.
    Your problem has nothing to do with Qt.

    Quote Originally Posted by dKoder View Post
    C:\QT\projects\helloWorld>ming32-make
    'ming32-make' is not recognized as an internal or external command,
    mingw32-make

    But it looks like make itself works. What did you install exactly?

  5. #5
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 -vs6-w2k

    I installed the open source version 4.2.1 of QT. When I tried to build the debug libraries I got a list of errors. I then searched the net and found this and other forums. One of the forums suggested that I remove the MinGW app and download and install it seperately. I did that. Having reinstalled MinGW the build debug libraries portion built successfully. Everything else has worked without a hitch until the 'make' portion of the compile.

    dKoder

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    One of the forums suggested that I remove the MinGW app and download and install it seperately.
    And what did you download?

  7. #7
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 -vs6-w2k

    Not exactly. I do use the QT command prompt though. When I open QT command prompt i'm greeted with the following:

    Setting up a MinGW/Qt only environment...
    -- QTDIR set to C:\Qt\4.2.1
    -- PATH set to C:\Qt\4.2.1\bin
    -- Adding C:\MinGW\bin to PATH
    -- Adding C:\WINNT\System32 to PATH
    -- QMAKESPEC set to win32-g++

    C:\Qt\4.2.1>

    At this point I change to the helloWorld directory and enter the qMake commands as stated above.

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    -- Adding C:\MinGW\bin to PATH
    Where did you install MinGW?

  9. #9
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 -vs6-w2k

    MinGW installed in "c:\mingw". I put an entry in the autoexec.bat to include it in the path. But whats confusing me is the error states that g++ is not recognized as a command. See below:
    What can I do to check that?


    Qt" -I"debug" -I"." -I"..\..\..\Qt\4.2.1\mkspecs\win32-g++" -o debug\main.o main
    .cpp
    'g++' is not recognized as an internal or external command,

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    What can I do to check that?
    Check whether you have g++.exe in C:\MinGW\bin.

  11. #11
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 -vs6-w2k

    No sir. G++.exe is not there. I check the MinGW site and I didn't see anything that looked like a winders version.

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    No sir. G++.exe is not there.
    What about mingw32-g++.exe? Which file did you download and install from MinGW site?

  13. #13
    Join Date
    Nov 2006
    Posts
    15
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt4 -vs6-w2k

    This one mingw32-make-3.80.0-3.exe.

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

    Default Re: Qt4 -vs6-w2k

    Quote Originally Posted by dKoder View Post
    This one mingw32-make-3.80.0-3.exe.
    That explains everything. This file contains only the make program, not the whole toolchain.

    Try this: http://prdownloads.sourceforge.net/m...inGW-4.1.1.exe

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
  •  
Qt is a trademark of The Qt Company.