Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Read these answered questions to understand the difference between Cygwin and MinGW.</p> <hr> <p>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. Windows, Linux and Mac OS X…).</p> <blockquote> <p>Answer #1: Write your source code in JAVA. Compile the source code once and run it anywhere.</p> </blockquote> <hr> <p>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. Windows, Linux and Mac OS X …).</p> <blockquote> <p>Answer #2: Write your source code in C or C++. Use standard header files only. Use a suitable compiler for any platform (e.g. Visual Studio for Windows, GCC for Linux and XCode for Mac). Note that you should not use any advanced programming features to compile your source code in all platforms successfully. If you use none C or C++ standard classes or functions, your source code does not compile in other platforms.</p> </blockquote> <hr> <p>Question #3: In answer of question #2, it is difficult using different compiler for each platform, is there any cross platform compiler?</p> <blockquote> <p>Answer #3: Yes, Use GCC compiler. It is a cross platform compiler. To compile your source code in Windows use <strong>MinGW</strong> that provides GCC compiler for Windows and compiles your source code to native Windows program. Do not use any advanced programming features (like Windows API) to compile your source code in all platforms successfully. If you use Windows API functions, your source code does not compile in other platforms.</p> </blockquote> <hr> <p>Question #4: C or C++ standard header files do not provide any advanced programming features like multi-threading. What can I do?</p> <blockquote> <p>Answer #4: You should use POSIX (Portable Operating System Interface [for UNIX]) standard. It provides many advanced programming features and tools. Many operating systems fully or partly POSIX compatible (like Mac OS X, Solaris, BSD/OS and ...). Some operating systems while not officially certified as POSIX compatible, conform in large part (like Linux, FreeBSD, OpenSolaris and ...). <strong>Cygwin</strong> provides a largely POSIX-compliant development and run-time environment for Microsoft Windows.</p> </blockquote> <hr> <p>Thus:</p> <h2>To use advantage of GCC cross platform compiler in Windows, use MinGW.</h2> <h2>To use advantage of POSIX standard advanced programming features and tools in Windows, use Cygwin.</h2>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload