

Do not use any advanced programming features (like Windows API) to compile your source code in all platforms successfully. To compile your source code in Windows use MinGW that provides GCC compiler for Windows and compiles your source code to native Windows program. Question #3: In answer of question #2, it is difficult using different compiler for each platform, is there any cross platform compiler?Īnswer #3: Yes, Use GCC compiler. If you use none C or C++ standard classes or functions, your source code does not compile in other platforms. Note that you should not use any advanced programming features to compile your source code in all platforms successfully. Visual Studio for Windows, GCC for Linux and XCode for Mac). Use a suitable compiler for any platform (e.g.
MINGW VS CYGWIN MAC OS X
Windows, Linux and Mac OS X …).Īnswer #2: Write your source code in C or C++. Question #2: I want to create an application that I write source code once but there is no problem that I compile the source code for any platforms separately (e.g. Compile the source code once and run it anywhere. Windows, Linux and Mac OS X…).Īnswer #1: Write your source code in JAVA. Question #1: I want to create an application that I write source code once, compile it once and run it in any platforms (e.g. Read these answered questions to understand the difference between Cygwin and MinGW. If you use such a framework from the start, you can not only reduce your headaches when it comes time to port to another platform but you can use the same graphical widgets - windows, menus and controls - across all platforms if you're writing a GUI app. MinGW is an open-source alternative to Microsoft Visual C++ compiler and its associated linking/make tools.Ĭonsiderably sophisticated cross-platform frameworks exist which make the task of porting applications to various operating systems easily - for example the Qt framework is a popular framework for cross-platform applications.
MINGW VS CYGWIN .DLL
dll files, though you could also cross-compile with the right settings. By default, code compiled in MinGW's GCC will compile to a native Windows X86 target, including. It does not have a Unix emulation layer like Cygwin, but as a result your application needs to specifically be programmed to be able to run in Windows, which may mean significant alteration if it was created to rely on being run in a standard Unix environment and uses Unix-specific features such as those mentioned earlier.

It does not attempt to emulate or provide comprehensive compatibility with Unix, but instead it provides the minimum necessary environment to use GCC (the GNU compiler) and a small number of other tools on Windows. MinGW is a Windows port of the GNU compiler tools, such as GCC, Make, Bash, and so on.
MINGW VS CYGWIN SOFTWARE LICENSE
If you want to compile something for Cygwin and distribute that resulting application, you must also distribute the Cygwin run-time environment (provided by cygwin1.dll) along with it, and this has implications for what types of software license you may use.

If your application assumes that it can use Unix feature such as pipes, Unix-style file and directory access, and so forth, then you can compile it in Cygwin and Cygwin itself will act as a compatibility layer around your application, so that many of these Unix-specific paradigms can continue to be used with little or no modification to your application. The purpose of Cygwin is to make porting *nix-based applications to Windows much easier, by emulating many of the small details that Unix-based operating systems provide, and are documented by the POSIX standards. Compile something in Cygwin and you are compiling it for Cygwin.Ĭompile something in MinGW and you are compiling it for Windows.
