Imported from the Apple Support Forums via the Wayback Machine 🔗
Hello! I'm new on Macs, and in my first computer programming course. We're making simple Windows console applications, and I made it on a PC in .net Visual Studio 2003 just fine. Is there a way to make this again in Xcode on my Mac and end up with a working Windows .exe file? If not in Xcode, is there any Mac environment that will let me do this?
Imported from the Apple Support Forums via the Wayback Machine 🔗
If you use standard libraries in languages like C, C++ or Java, well you can use the same source code to compile it on your Mac. In case of a .NET program... Well, you won't be able to make it work on a Mac, you can try using Mono, but don't count on it too much.
For .exe, you must know that Mac and Windows environment are completely different, that's not the same system, .exe are executables for Windows and DOS, not for Mac OS nor Linux, you can't create a .exe on a Macintosh, you just can't, if you want to you must use programs that virtualize Windows or use BootCamp to use Windows directly on your Mac, but Xcode won't build .exe program (happily).
But if you use standard libraries or cross-platform libraries you can use the same source code to build programs for Mac and Windows, but you'll have to compile for each platform.