views:

72

answers:

2

Hi All,

I am using XCode for developing a C++ Console Application. After compiling XCode generates the Unix Executable File, which run on Mac perfectly. But doesn't work on windows. I have tried changing the active architecture as well from x86_64 to i386 but no luck.

Is it possible anyway to generate executable like Borland C, or Turbo C compilers does. ?

A: 

Although the compiler will compile for different CPU architectures, building for another OS is not supported (with iOS being the exception).

Eiko
@Potatoswatter: Deleted the second paragraph entirely... didn't really answer any question anyway.
Eiko
+2  A: 

XCode does not generate Windows binaries. Processor architecture isn't the only thing that is different - executable format, names of import libraries, ABI, etc., etc.

Use a Windows compiler, like Visual C++ Express, to generate a Windeows binary.

Michael