Apple Historian
Join Date: May 2004
|
This question is for anyone that's used Qt (a C++ API) on Mac OS X. I'm trying
to run a simple "hello world program" from the book we're using. The code is (../hello/hello.cpp): #include <qapplication.h> #include <qlabel.h> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *label = new QLabel("Hello Qt!", 0); app.setMainWidget(label); label->show(); return app.exec(); } To run the program the book tells me to run the following commands: qmake -project qmake hello.pro make open hello.app Everything works fine until the "open" command spits out the following: 2006-01-17 17:10:07.176 open[4505] LSOpenFromURLSpec() returned -10827 for application (null) urls file://localhost/Developer/qt-mac-free-3.2.1/hello/hello.app/. I have no idea what this means. I checked the code and did everything verbatim from the book. If someone could help me I would greatly appreciate it. Thanks! |
quote |
Banging the Bottom End
Join Date: Jun 2004
|
Try using open -a hello.app
The "-a" switch is what I use to launch GUI apps from the command line. This is for Xcode generated apps though, I'm not sure if it'll work the same for Qt apps. |
quote |
‽
|
Sounds like a corrupt bundle to me. What does Info.plist look like?
|
quote |
Finally broke the seal
Join Date: May 2004
|
i havent done much with Qt, on OSX or otherwise, but I suspect that make is not generating hello.app, but instead just an executable: hello. try: ./hello from that directory. if that doesn't work, can you report back with a listing of the directory contents? also, and again this may be my ignorance of Qt, but you may need to create a window to add the Qt label to (this is quite unrelated to your error though).
|
quote |
Posting Rules | Navigation |
|
Thread Tools | |