Results 1 to 11 of 11

Thread: problem compiling qt4 application on Windows

  1. #1
    Join Date
    Apr 2006
    Posts
    5
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face problem compiling qt4 application on Windows

    Hi,
    I'm trying to find some info. on compiling on Windows. My qt4 app compiled just fine in Linux but I'm having problems in Windows. Does anyone know where a good tutorial is? I got the error "nmake is not recognized as an internal or external command" when I had the project folder in My Docs. I moved my project folder to the Visual Studio directory and now I get "g++ not recognized as internal or external command" , NMAKE: fatal error U1077.........

    I can't find a tutorial and I'm not even sure I'm even doing this right. Any help would be appreciated.

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem compiling qt4 application on Windows

    In your PATH add the path to where your nmake.exe is. You might also have to add INCLUDE path to your string.h. There might also be some other things you need to add.

  3. The following user says thank you to munna for this useful post:

    superd (27th April 2006)

  4. #3
    Join Date
    Mar 2006
    Location
    Vadodara, Gujarat, India
    Posts
    65
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Lightbulb Re: problem compiling qt4 application on Windows

    i think i shall run the compiling steps again on windows. i guess u r running nmake from the prompt directly so the error of g++.

    Just run the commands again :

    Qt Code:
    1. ->qmake -project ( if u don't hav a .pro file, else don't run it, it will overwrite ur existing .pro)
    2. ->qmake
    3. ->nmake
    To copy to clipboard, switch view to plain text mode 


    Also, add the required PATHS in the INCLUDE directive as suggested by munna bhai
    Do what u r afraid to do, and the death of fear is sure.

  5. The following user says thank you to ankurjain for this useful post:

    superd (27th April 2006)

  6. #4
    Join Date
    Apr 2006
    Posts
    5
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem compiling qt4 application on Windows

    Thats the steps i went through. qmake -project, qmake, then nmake. I get the error on nmake. The error changes to the g++ one after I put my project folder in the Visual Studio directory. Shouldn't I be able to run nmake from anywhere in the command prompt?? I tried using the entire path to nmake but still get the same error. I'm really new to this though. I think I'm missing something simple. I really need to find a in depth tutorial on compiling Qt apps in windows. Or maybe how to integrate it with Visual Studio. I'm doing the tutorial from "The Independant Qt Tutorial". Here is my project file after I ran qmake if anyone wants to look at it. Thanks again.
    Attached Files Attached Files

  7. #5
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem compiling qt4 application on Windows

    It compiles perfectly for me.

    Here's the dialog



    type PATH on your command prompt and see if the path to your nmake.exe is available in the output.

  8. The following user says thank you to munna for this useful post:

    superd (27th April 2006)

  9. #6
    Join Date
    Mar 2006
    Location
    Vadodara, Gujarat, India
    Posts
    65
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem compiling qt4 application on Windows

    ditto for me buddy,
    compiled on first run, even no need to do any changes anywhere.
    do as our munna bhai says
    Do what u r afraid to do, and the death of fear is sure.

  10. The following user says thank you to ankurjain for this useful post:

    superd (27th April 2006)

  11. #7
    Join Date
    Apr 2006
    Posts
    5
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem compiling qt4 application on Windows

    Ok, you guys have been very helpful. This is my first go at compiling anything in Windows and I'm familiar with the OS so I don't know even the basics. Be patient, I'm learning fast(i think).

    I appended the PATH to reflect the path to nmake.exe that solved that error. I then got the error "g++ not recognized and internal or external command". I did the same, appended PATH to reflect the path to g++.exe. It ran like it was going to compile but then errored out with MS error report pop-up. This said "ld.exe encountered a problem and needs to close" Any ideas??? I've searched, and can't find anything on this one. Thanks for the help.
    Oh, I am installing Qt on my other box to see if I can get this to work there. I'm thinking I've got a corrupt file somewhere.

  12. #8
    Join Date
    Apr 2006
    Posts
    5
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem compiling qt4 application on Windows

    It compiled just fine on my other box. So if you have any ideas about what might be wrong with the ld.exe on this other box it would be greatly appreciated.

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

    Default Re: problem compiling qt4 application on Windows

    Do you have commercial or Open Source edition? The latter (officially) works only with MinGW, so you can't use it with M$ toolchain.

  14. The following user says thank you to jacek for this useful post:

    superd (28th April 2006)

  15. #10
    Join Date
    Apr 2006
    Posts
    5
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: problem compiling qt4 application on Windows

    I have the open source edition. I haven't heard of the M$ toolchain but I will go check it out. I did get my application working though. I reinstalled Qt on my laptop.(the one I was having problems with) It compiled fine but I still can't run the app. I get an error that says "entry point in QtCore4.dll could not be found". I replaced that dll with the one from my other box where the app is working fine but I still get the same error. I'm not sure whats going on there but I have a few more things to try. I think I have learned a great deal from you guys so thanks again for everyones help.

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

    Default Re: problem compiling qt4 application on Windows

    Quote Originally Posted by superd
    I have the open source edition.
    In this case you should use MinGW and its tools --- not "nmake". Make sure that PATH environment variable contains a path to MinGW's bin directory.

Similar Threads

  1. Porting Qt application from linux to Windows
    By ankit17.ag in forum Qt Programming
    Replies: 5
    Last Post: 12th February 2009, 22:18
  2. Replies: 0
    Last Post: 3rd December 2008, 21:22
  3. Problem install qwt on windows
    By kid17 in forum Qwt
    Replies: 5
    Last Post: 3rd December 2008, 13:19
  4. Application plugin on windows
    By Eyee in forum Qt Programming
    Replies: 2
    Last Post: 22nd March 2006, 18:36
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 09:08

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.