[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printf: doens't print on WinXP installation
From: |
Eric Wasylishen |
Subject: |
Re: printf: doens't print on WinXP installation |
Date: |
Sun, 21 Aug 2011 13:20:32 -0600 |
Hey,
To elaborate a bit.. I struggled with this problem as well, and it turns out to
be a quirk in windows.
A windows exe has a "subsystem" property - if it uses the console subsystem,
printf output will go to the console as you'd expect. The problem is, if you
use the console subsystem for a gui app, a console window will open every time
you start the app.
Likewise, there's a "gui" subsystem which won't cause a console window to open,
but printf output goes nowhere, even if you start the gui app from a console
window.
GNUstep-make uses the console subsystem if you build a GNUstep Tool, and the
gui subsystem if you build a GNUstep Application. So, for gui applications,
your best bet is to use NSLog and read the output from the event viewer, -or-
run the application in gdb, and NSLog output will appear in the gdb console.
Hope this helps
--Eric
On 2011-08-20, at 10:09 PM, engr0123 wrote:
>
> No need to change anything. Compile as you have done originally.
> The output can be seen here (I am using Windows XP):
>
> Go to: Control panel | Administrative Tools | Computer Management
> Under System Tools, click Event Viewer, and then Application.
>
> On right side, double click the entry generated by your App. You will see
> your printf of NSLog output at the end of the text that is shown in a
> dialog.
>
>
>
>
> Alex Bilyk wrote:
>>
>> Hi,
>>
>> Just installed GNUstep on Win XP. Doing the simplest of things with a main
>> function that has printf("hello, world"); in it. Everything compiles and
>> runs, except there is no output to the console. I can step through code in
>> dgb and it goes over this line fine. A bit of a puzzle. Tried to use
>> NSLog(@"..."); version - same result. App is built and run successfully,
>> but with no printout to the console. Any ideas? BTW, stepping in gdb over
>> the NSLog version has some issues that the printf version doesn't have,
>> but that's a separate topic. I'm really after the printout at the moment,
>> as you might imagine:)
>>
>> Thanks,
>> Alex
>>
>
> --
> View this message in context:
> http://old.nabble.com/printf%3A-doens%27t-print-on-WinXP-installation-tp25528385p32304193.html
> Sent from the GNUstep - Help mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Help-gnustep mailing list
> Help-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-gnustep