Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: phibit on February 19, 2016, 03:49:17 AM

Title: GNU GCC compiler for C/C++
Post by: phibit on February 19, 2016, 03:49:17 AM
My compiler is "GNU GCC compiler".

Is there some way to find out the version of this compiler and the version of C++ it compiles for?

Is there some way to choose the version of this compiler?

The reason I ask is that it doesn't recognize the string method pop_back() in code that I compile and run in another IDE.
Title: Re: GNU GCC compiler for C/C++
Post by: stahta01 on February 19, 2016, 05:35:22 AM
http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps (http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps)

Quotego to "Settings->Compiler and Debugger->Global Compiler settings->Toolchain executables"

or

Quotego to "Settings->Compiler->Global Compiler settings->Toolchain executables"

Look at the path for "Compiler Installation Directory"; the compiler is in a bin folder under that location.

My "Compiler Installation Directory" is "C:\Apps32\MinGW-4.7.1-save".


cd C:\Apps32\MinGW-4.7.1-save

C:\Apps32\MinGW-4.7.1-save>cd bin

C:\Apps32\MinGW-4.7.1-save\bin>mingw32-gcc.exe --version
mingw32-gcc.exe (tdm-1) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Tim S.


Title: Re: GNU GCC compiler for C/C++
Post by: CHAOS-THEORY on February 19, 2016, 01:06:24 PM
In Linux you prolly would have a link or a pre-built libs and toolchain included/installed in Linux, which is called in Code::Blocks using "gcc"
So all you got to do is open a terminal then type "gcc --version"
You can also print more help if you need all the options using "gcc --help"

(http://i.imgur.com/7Zp1weTl.jpg)
Title: Re: GNU GCC compiler for C/C++
Post by: phibit on February 20, 2016, 11:55:51 PM
Thank you for the replies! I put them to use, trying two GNU compilers so far.