[Qt-interest] how to create a console application on Mac OS?
Thiago Macieira
thiago.macieira at trolltech.com
Thu Feb 26 09:49:11 CET 2009
Em Quinta-feira 26 Fevereiro 2009, às 07:28:47, James Yan escreveu:
> 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?
There should be nothing special.
What happens when you run that application from a shell?
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090226/38a2cb83/attachment.bin
More information about the Qt-interest-old
mailing list