Directory:
1, open Source Environment choice: ide+ Compiler
2. Build steps
1, open Source Environment choice: ide+ Compiler
Here are the tools that are published under the GPL license: codeblocks and GNU GCC
Codeblocks Latest version Download: http://www.codeblocks.org/downloads/binaries
GCC Release Note: Here is the GCC source code issued by the GCC source code (because each time there is a change to provide a precompiled file for multiple platforms at the same time is difficult), choose a different platform to download it yourself--Here I choose Windows MinGW, into For a brief introduction to the corresponding website, click Download to enter the SourceForge download page, and on the page, click Download mingw-get-setup.exe (86.5 kB) to download the MinGW installation Manager. (These processes may require F GFW)
This manager is also open source for GPL, which allows you to choose the GNU gcc compiler version you want to install, such as the C compiler, C + + compiler, ADA compiler, etc., and then download it online and get the final compiler.
2. Build steps
After downloading Codeblock on the website, create a simple console project, which is simple Hello world and cannot be executed. Because the default should be no compiler, you need to download and specify in Codeblocks, this is to download the above mentioned MinGW reason.
Methods for specifying compilers in Codeblock: Setting, Compiler, Select Compiler, Gnu Gcc Compiler, toolchain executables-& Gt Select the directory where the MinGW is installed (e.g.)
Prior to this, you need to install the GNU GCC compiler version to install using the Mingw-get-setup.exe installed MinGW Installation Manager above, as this is just a manager, it does not have any compiler in itself, he just provides a convenient download option.
After observing the compiler's instructions and my own needs, I chose the C and C + + compilers, respectively Mingw32-base and mingw32-gcc-g++: (e.g.)
After the tick, click Installation->apply changes will automatically install, after installation and then in the above mentioned Codeblock select the installation directory there to specify your installation MinGW directory.
After clicking OK to save, compile a simple C + + console Hello World program, the compiler error:
Ld.exe not Found-lpthread
This is missing the meaning of the library pthread, this seems to be related to the POSIX standard, this GCC run using the interface may be written in this standard (by thread mode:posix guessing), so need to use the corresponding library.
Fortunately, the MinGW Installation Manager also provides a download of the relevant libraries, as follows:
All Packages, MinGW, MinGW Libraries, at this time in the list on the right, early to three mingw32-pthreads-w32 (should be at the bottom, the class doc is the document, No words should also be possible, other dev and lic I do not know what the specific, the two best to choose, and then also after the check, click Installation->apply changes installed should be ready. At least I can compile the c\c++ console program.
c++--Building an open source development environment