Cài gcc compile cho windows
WinLibs standalone build of GCC and MinGW-w64 for WindowsJump to: Download | How to use from Windows Command Prompt | How to use from Code::Blocks | Philosophy Show What is it?In short: it's a free C and C++ compiler for Microsoft Windows. GCC (GNU Compiler Collection) is a free and open source compiler for C and C++ (and other languages like Objective-C, Fortran, D). Also some additional tools are added, including:
This is a standalone build, which means this download offers a complete compiler environment for Windows. In the future WinLibs plans to also release binary packages of many open source libraries and applications built with this compiler. Click here to see the philosophy and design decisions behind winlibs.com. Who is it for?WinLibs could be just what you are looking in these case:
MSVCRT or UCRT runtime library?Traditionally the MinGW-w64 compiler used MSVCRT as runtime library, which is available on all versions of Windows. Since Windows 10 Universal C Runtime (UCRT) is available as an alternative to MSVCRT. Universal C Runtime can also be installed on earlier versions of Windows (see: Update for Universal C Runtime in Windows). Unless you are targetting older versions of Windows, UCRT as runtime library is the better choice, as it was written to better support recent Windows versions as well as provide better standards conformance (see also: Upgrade your code to the Universal CRT). DownloadThe following downloads are available (for Windows only). Each version comes in 2 flavors:
Release versionsUCRT runtime
MSVCRT runtime
Snapshot versionsIn between release versions of GCC
occasional snapshots are made available. As these are not actual releases they should not be treated as such. MSVCRT runtime
Other downloadsFor checksum files and older releases check out the GitHub releases page. Why?GCC already runs on many different platforms (including GNU/Linux and Apple macOS) and had been around for a long time (since 1987). GoalsEach release build is built with itself or a newer release, so optimizations included in newer GCC versions are also compiled into the compiler itself. The ultimate goal of WinLibs is to also provide libraries built with this compiler, in order to provide a comprehensive C/C++ development environment, with the following goals in mind:
UsageFrom the Windows Command PromptCompiling from the console isn't generally the most easy way of building software, but this explanation shows how you can get started quickly. Open the Windows Command Prompt. SET PATH=D:\Prog\winlibs64-9.2.0-7.0.0\mingw64\bin;%PATH% CD /D C:\TEMP Create your source file(s) (helloworld.c in the example below). NOTEPAD helloworld.c In Notepad create the new file and then save it: #include Compile the example: gcc -o helloworld.exe helloworld.c Or if you want to compile and link in seperate steps: gcc -c -o helloworld.o helloworld.c gcc -o helloworld.exe helloworld.o Then you can run the compiled program: helloworld.exe From Code::BlocksCode::Blocks is a free integrated development environment (IDE) for C and C++.
Known issuesProblem:
In some cases (e.g. when building GCC 10.2.0) there are printf format compiler errors when building against MinGW-w64 8.0.0. See MinGW-w64 ticket #853. Problem:
When building software that sets _FORTIFY_SOURCE to something other than 0 there are errors when building against MinGW-w64 7.0.0. See MinGW-w64 ticket #818. Problem: When using GCC 10 there are multiple definition of ` LicensePlease see each of the components and dependancies for their respective licenses.
Who are you? My name is Brecht Sanders, and I have been a passionate open source user and developer for many years.
Support winlibs.comIf you like this project and would like to support it please consider donating. |