Author Topic: GNU GCC compiler for C/C++  (Read 10548 times)

Offline phibit

  • Single posting newcomer
  • *
  • Posts: 2
GNU GCC compiler for C/C++
« 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: GNU GCC compiler for C/C++
« Reply #1 on: February 19, 2016, 05:35:22 am »
http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler#Compiler-neutral_setup_steps

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

or

Quote
go 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".

Code
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.


« Last Edit: February 19, 2016, 06:02:33 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

CHAOS-THEORY

  • Guest
Re: GNU GCC compiler for C/C++
« Reply #2 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"


Offline phibit

  • Single posting newcomer
  • *
  • Posts: 2
Re: GNU GCC compiler for C/C++
« Reply #3 on: February 20, 2016, 11:55:51 pm »
Thank you for the replies! I put them to use, trying two GNU compilers so far.