Way Cross Compile C / C ++ to work on Windows, Linux and Mac OS?

Is there a way to take my C ++ code and compile it to work on Windows, Mac OS and Linux? Is there a tool for this or does it need to be compiled manually in each OS via Terminal / Cygwin?

+3
source share
3 answers

You can cross-compile using the so-called cross-compiler. Mingw can be installed as such. I believe MacOS just uses g ++, so you can probably do a cross-compiler for it. I never did it myself. You can comb the network for routes. Here is the top link I got from google:

http://linux.bytesex.org/cross-compiler.html

+2

- Mac OS X Linux Windows (, , Parallels VMware Fusion). , , .

+5

, , ANSI ++. , , . , . .

, , , , -. .

0

Source: https://habr.com/ru/post/1538172/


All Articles