I have created a program in C++ using Visual Studio that compiles code to an EXE file that can then be run. This works fine for Windows computers, but EXE files are not runnable on Mac without extra programs such as Wine Bottler. I would like to be able to compile the code so that it is a file that can be run on Macs such as an APP file. I don't know how to do this, though, and I can't find out how anywhere. Is there a way to do this, and if so, how?
Asked
Active
Viewed 343 times
0
-
1Compile it on a Mac. – sweenish Feb 13 '22 at 04:25
-
What you are asking for is called cross-compiling. But Visual Studio on Windows does not cross-compile apps for Mac. To produce Mac apps in Visual Studio, you need to run Visual Studio on a Mac, and compile your project on that Mac. – Remy Lebeau Feb 13 '22 at 04:42
-
That is very interesting, thank you. Besides cross-compiling, is there any other way to create programs on a Windows computer that can run on Macs. For example, all over the internet there are programs that work cross-platform where versions can be downloaded for Mac, Windows, and Linux. Do the creators of these programs often make the Mac compatibility on Macs or is there another method to make programs cross-platform? – Pierce Feb 13 '22 at 14:36
-
@Taco "*Besides cross-compiling, is there any other way to create programs on a Windows computer that can run on Macs*" - No. The only other way is to compile a Windows program and run it inside a Windows VM. "*Do the creators of these programs often make the Mac compatibility on Macs or is there another method to make programs cross-platform?*" - the code must be compiled for each platform being targeted. Whether a cross-compiler is used or not depends on the creator's preference and project setup. – Remy Lebeau Feb 14 '22 at 08:05
-
This thread may help: [Build an iOS app without owning a mac](https://stackoverflow.com/a/43950736/16764520). – Minxin Yu - MSFT Feb 14 '22 at 09:08
-
Would it be possible for one to use Clang with Visual Studio to compile programs for Mac while on a Windows PC? – Pierce Feb 14 '22 at 15:07