PDA

View Full Version : Qt Creator Builds application, but doesn't run it



tpg
29th June 2010, 09:43
I've got a problem at the moment in QtCreator 2 on Mac OS X. I've just opened an oldish project with QtCreator, that before I was managing by hand with qmake. It built fine against Qt 4.6, but then the IDE refuses to run the application, with the error:

"Failed to start program. Path or permissions wrong?"

The problem is immediately obvious, since the line above reads

"Starting ...bin/appname.app/Contents/bin/appname"

whereas the build placed the executable at "Contents/MacOS/appname" (as is customary on OS X). Now, here's the strange part - I have a top level directory containing appname.pro, and a 'src' folder containing src.pro, which refers to all the source & user interface files. In src.pro, I have "TARGET = ../bin/appname" set.

I tried changing this line to read "TARGET = ../MacOS/appname", and now the application runs - BUT it's now running

"Starting ...MacOS/appname.app/Contents/MacOS/appname"

Obviously, I don't want to have to cater to QtCreator's idiosyncrasies like this. How should I fix this properly? Thanks in advance.

lyuts
2nd July 2010, 10:49
I think the reason might be in "Working directory" parameter in "Run Settings" section. You might want to check that.