Issue
I read that Visual Studio
now supports cross-platform development. I'm using CMake
to compile for Windows
and Ubuntu
(using WSL
) so far. However there doesn't seem to be any information on how to actually accomplish the cross-compilation using Visual Studio
to target Mac OS X
. Is it doable with the CMakeSettings.json
? According to this article, you can choose Linux-Debug
and Linux-Release
as configurationType
but in Visual Studio 2017 Enterprise
the Linux
options aren't even available for me, neither is Mac OS X
.
I might just setup a virtual machine as suggested in this post which seems to be the most convenient solution to get the job done.
Solution
Apparently you can't.
I ended up installing a virtual machine with Mac OS X
and successfully compiled my code inside it using shared folders to make my Windows
host source code available to the guest. This is certainly more reliable and sane to do than some hacky cross-compilation project. The latter still doesn't guarantee that the code will successfully run and not unexpectedly crash on the cross-compilation target operating system.
Alternatively, if you can get your hands on an (old) Macbook or so you can use that and enable network sharing to your main machine (e.g. a Windows PC). This way you can grab freshly compiled binaries directly from your Macbook using Windows and you're set with compiling your macOS builds.
Answered By - BullyWiiPlaza Answer Checked By - Gilberto Lyons (WPSolving Admin)