Qt MAC Application exits automatically after compiling



  • hii,
    I am making a Qt application for MAC OSX 10.6.2(Snow Leopard). My problem is, as soon as I run the application, after compiling, it automatically gets exited..It doesn't show any errors, below is the compiled output of the application..Can anyone help me for this..

    Thanx in advance.


    Running build steps for project Mac...
    Configuration unchanged, skipping qmake step.
    Starting: "/usr/bin/make" -w
    make: Entering directory /Volumes/abc/Program Files/myapp_src/build_mac' g++ -c -pipe -O2 -Wall -W -DAPP_VERSION=1.0 -DAPPLICATION_NAME=MyApp -DORGANIZATION_NAME=Soft -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I../MyApp -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I../MyApp -I. -I. -I. -F/Library/Frameworks -o myapp.o ../MyApp/myapp.cpp ../MyApp/myapp.cpp:364: warning: unused parameter 'event' ../MyApp/myapp.cpp:1105: warning: unused parameter 's' ../MyApp/myapp.cpp:1161: warning: unused parameter 'path' g++ -headerpad_max_install_names -o MyApp.app/Contents/MacOS/MyApp myapp.o main.o extension.o appstart.o info.o about.o credits.o version.o moc_myapp.o moc_extension.o moc_appstart.o moc_info.o moc_about.o moc_credits.o moc_version.o qrc_icons.o qrc_config.o qrc_info.o qrc_about.o qrc_credits.o -F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework QtCore -framework QtNetwork make: Leaving directory/Volumes/abc/Program Files/myapp_src/build_mac'
    The process "/usr/bin/make" exited normally.



  • This is just the compile output, not the application output (different window in creator). Did you hit F5 or one of the green triangles, or did you hit ctrl-b?



  • Below is the application output...

    Starting /Volumes/abc/Program Files/myapp_src/build_mac/MyApp.app/Contents/MacOS/MyApp...
    /Volumes/abc/Program Files/myapp_src/build_mac/MyApp.app/Contents/MacOS/MyApp exited with code 0


  • Moderators

    Basic question: Are you sure you're calling exec() on your QApplication in your main()?



  • ya....now i finally figured out that problem...
    Thanx all of you for your help.

    But now i am getting a different error

    1. "2011-08-24 12:00:39.295 MyApp[379:80f] *** __NSAutoreleaseNoPool(): Object 0x6a89090 of class NSCFArray autoreleased with no pool in place - just leaking"

    2. "QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event."

    How can i solve these...please help..



  • Closed thread, please follow up in "this thread":http://developer.qt.nokia.com/forums/viewthread/9097/ for the NSCFArray/QCocoaView error.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.