Code::Blocks Forums

User forums => Help => Topic started by: AntiElephant on January 28, 2016, 06:43:46 pm

Title: Why is codeblocks not throwing a consistent error here?
Post by: AntiElephant on January 28, 2016, 06:43:46 pm
I recently installed Ubuntu 15.10 and installed codeblocks from the repository.

The g++ version that came with Ubuntu is reported in the terminal as 5.2.1.


I went to test out that Code::Blocks is running the right g++ version, I know there is an error in earlier versions of g++ where default constructors ignore the private access specifier. This is sorted out by 5.2.1. I tested this out by compiling in the command line, which throws an error as expected since I'm running 5.2.1. However when I run this through code blocks there is no error? This is odd because the compiler settings show it is using the exact same compiler so I can't figure out why. I also made sure to select the -std=c++11 flag.

This image shows what I mean:

(http://i.imgur.com/DsyMfw6.png)

The terminal does not compile. But codeblocks, shown to use the exact same compiler, does. What could be wrong here? (And yes the project is also using the GCC compiler).
Title: Re: Why is codeblocks not throwing a consistent error here?
Post by: MortenMacFly on January 28, 2016, 07:25:24 pm
On Linux, you often have several compilers installed. Please compare the compiler by the FULL PATH name, not only the executables name. Use "which g++" on the console and check the compiler settings in Code::Blocks.

Make the same with "test.cpp".

Also, enable and show the FULL build log, if you need more help.
Title: Re: Why is codeblocks not throwing a consistent error here?
Post by: AntiElephant on January 28, 2016, 08:13:16 pm
I think I did something wrong with the building.

I rebuilt the project and I got the error message as usual.

Sorry, should've tried that at the start but didn't occur to me.