• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Equivalent to a Win32 console application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Equivalent to a Win32 console application?


  • Subject: Equivalent to a Win32 console application?
  • From: Guillaume Billard <email@hidden>
  • Date: Mon, 14 Sep 2009 18:11:39 +0200

Hello,

I'm porting a C++ Windows console application that can be simplified as:

#include <Windows.h>
#include <iostream>

int main(int, char**)
{
std::cout << "standalone output";

OutputDebugStringW( L"debug output" );

return 0;
}

When launched outside of Visual Studio, this app opens a window with a console inside, displays "standalone output" and shuts down.
When launched from Visual Studio, it does the same but also displays "debug output" in the debug output pane of Visual Studio.

I'd like to obtain the same behavior with Xcode.

- When launched from the terminal, the app should only display "console output".
- When launched from Xcode, the Xcode console should only display "debug output", and the app console should only display "standalone output".

- cout output is displayed in the Xcode console. Is there a way to avoid this?
- On this Stack Overflow page, it is recommended that the debug output be activated only if the debugger is detected. Is this the preferred equivalent to OutputDebugString for a C++ app?


Thanks.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Equivalent to a Win32 console application?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Xcode updating of source file modified time stamp
  • Next by Date: Re: Xcode updating of source file modified time stamp
  • Previous by thread: Re: Xcode updating of source file modified time stamp
  • Next by thread: Re: Equivalent to a Win32 console application?
  • Index(es):
    • Date
    • Thread