Results 1 to 6 of 6

Thread: Program wont start - Wont even enter main()

  1. #1
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Program wont start - Wont even enter main()

    My current program, being compiled using Qt Creator, wont start. It wont even enter main(). I'm using Windows 7, 32 bit. The program doesn't use the QT API.

    Regardless of whether I run it as admin, or run it from inside QtCreator or manually running the executable... it will not run.

    Compiles fine. Build proccess looks good. Executable generated, game icon visible on executable. Wont run. Whether I'm compiling in debug or release, it wont do a thing.

    When running, Qt goes through the basic steps ("Setting breakpoints...", "Loading someDllOrAnother...", "Application started."). After application started, nothing happens. QtCreator is fine, it doesn't freeze up or anything, but the program doesn't run. I have to manually kill the process (yes, it shows up as a proccess in Windows), or abort it in QT ("The gdb proccess exitted unexpectedly (crashed).")

    Compile output:
    Qt Code:
    1. Running build steps for project GameClient...
    2. Configuration unchanged, skipping qmake step.
    3. Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
    4. mingw32-make: Entering directory `D:/Desktop PC/Jacob/Projects/AdventureFar/GameClient/[Game]/Code/GameClient-build-desktop'
    5.  
    6. C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Release
    7.  
    8. mingw32-make[1]: Entering directory `D:/Desktop PC/Jacob/Projects/AdventureFar/GameClient/[Game]/Code/GameClient-build-desktop'
    9.  
    10. mingw32-make[1]: Nothing to be done for `first'.
    11.  
    12. mingw32-make[1]: Leaving directory `D:/Desktop PC/Jacob/Projects/AdventureFar/GameClient/[Game]/Code/GameClient-build-desktop'
    13.  
    14. mingw32-make: Leaving directory `D:/Desktop PC/Jacob/Projects/AdventureFar/GameClient/[Game]/Code/GameClient-build-desktop'
    15.  
    16. The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited normally.
    To copy to clipboard, switch view to plain text mode 

    My guess is it isn't QT, but that somehow Windows has a problem with it, or maybe Norton Antivirus - but I disabled Norton and still it wont run. Any ideas how I can go about isolating the problem? Any ideas of what it might be?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program wont start - Wont even enter main()

    What happens if you run the application from the command line?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Program wont start - Wont even enter main()

    Nothing. I even did so running the command line as administrator. It doesn't freeze the console, the console just continues past - as if the program ran and gave no output... but it should at the very least spit out the contents of a std::cout << "Test" << std::endl; line.

    Everything I see makes me think the executable itself is fine, but somehow Norton or Windows is blocking it. For example, when I run it, it shows up in the Processes Window (Ctrl+Shift+Esc in Windows 7). It just stays there - if execution ever reached the program, it should exit very very quickly. If execution reached the program and somehow got stuck in an infinite loop, the command line (and QT) would freeze up until the program exitted. That doesn't happen.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program wont start - Wont even enter main()

    Please show us your main().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Program wont start - Wont even enter main()

    Quote Originally Posted by ComServant View Post
    Nothing. I even did so running the command line as administrator. It doesn't freeze the console, the console just continues past - as if the program ran and gave no output... but it should at the very least spit out the contents of a std::cout << "Test" << std::endl; line.
    If it's build through Creator, you should add "CONFIG += console" to your .pro file, otherwise no input / output will work. Also, it may show something to put a breakpoint at beginning of main() and debug the application.

  6. #6
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Program wont start - Wont even enter main()

    Figured out the problem (but haven't yet solved it). It's unrelated to QT, but is somehow connected to a 3rd party API I'm using. Now that I've isolated the problem, I'll go about fixing it by studying it further.

    Thanks for all the fish and help! I really do apreciate it.

Similar Threads

  1. My first Linux QT program wont compile
    By GrahamLabdon in forum Newbie
    Replies: 1
    Last Post: 27th October 2010, 16:49
  2. Qt Opensource 4.5.2 wont compile
    By MarkoSan in forum Installation and Deployment
    Replies: 8
    Last Post: 26th November 2009, 07:56
  3. Replies: 2
    Last Post: 8th October 2008, 15:18
  4. OSX App wont run on other machines
    By December in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2007, 03:23
  5. freebsd 6 -> kdevelop wont uic
    By soul_rebel in forum KDE Forum
    Replies: 0
    Last Post: 5th January 2006, 23:00

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.