[Qt-interest] how to create a console application on Mac OS?

James Yan jyan972 at gmail.com
Thu Feb 26 07:29:25 CET 2009


does "CONFIG += qt console" only valid for windows platform?

On Thu, Feb 26, 2009 at 2:28 PM, James Yan <jyan972 at gmail.com> wrote:

> hey all,
>
>   I need a hello world like this with Qt:
> #include <QString>
> //main func
> int main(int argc,char* argv[])
> {
>     QString str = "Hello World\n";
>     printf("> %s\n",str.toAscii().data());
>     return 0;
> }
>
> then i insert a line like following to my .pro file:
> "CONFIG += qt console"
>
> it works all fine on windows, but fail ( or un-normal ) on Mac OS, compile
> is OK, i got a hello.app and can run it, but just do not get a "hello world"
> message in my terminal(bash), is there anything special on Mac to creating a
> console(non-GUI) application with Qt?
>
> thanks!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090226/3aebbd7b/attachment.html 


More information about the Qt-interest-old mailing list