Exporting from Mac to run on PC?

Hi there,

Super basic question, but can’t find the answer anywhere. I’m on mac, using xcode. Is there a way to export apps to run on pc’s? How do I go about this?

Thanks, mark.

With “PC” I suppose you mean Windows ?

I do it all the time.
I installed codeblocks
(but you can also use Visual C++)
and just copy the files from the mac.
It works in a similar way than xCode

If there is no Mac specific code in your application it just compiles normally.
else you have to use conditional compilation of this specific part of code:

#ifdef TARGET_WIN32  
#else // ...  


#ifdef TARGET_OSX  
#else // ...  

Thanks bernard,

I thought that must be the case. I was kinda hoping for a magic “export for windows” button in xcode but that may have been a little optimistic :slight_smile:

Thanks again, mark.