Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: candy.chiu.ad on April 26, 2012, 04:11:28 pm

Title: Missing error message
Post by: candy.chiu.ad on April 26, 2012, 04:11:28 pm
Hi,

The compilation errors I received in Build Log seem to be incomplete.  For example, one of them is

C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp: In instantiation of 'void Printer::doIt(T&&) [with T = double]':
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:52:9:   recursively required from 'void Printer::operator()(H&&, T&& ...) [with H = int; T = {double}]'
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:52:9:   required from 'void Printer::operator()(H&&, T&& ...) [with H = const int&; T = {int, double}]'
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:89:5:   required from 'void callNormalize(F, T&& ...) [with F = Printer; T = {const int&, int, double}]'
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:96:39:   required from here
C:\DiskE\cpp\LanguageTestGcc47\variadic_template.cpp:61:14: warning: value computed is not used [-Wunused-value]

While it printed out the stack trace, I don't know what the error is.  Am I missing something here?  I don't enough information to debug my program.

Thanks,
Candy

Title: Re: Missing error message
Post by: stahta01 on April 26, 2012, 04:36:17 pm
I think those are just warning and informational messages.
The "required from" are new in gcc 4.7; Code::Blocks thinks they are errors but they are not.

Tim S.
Title: Re: Missing error message
Post by: candy.chiu.ad on April 26, 2012, 05:01:03 pm
But the code didn't successfully compile, and therefore, is not executable.  How should I configure CodeBlocks to get rid of the "errors"?
Title: Re: Missing error message
Post by: oBFusCATed on April 26, 2012, 05:35:00 pm
If you're using gcc-4.7 then you should be ready for some breakages.
Install gcc-4.6 and everything will be fine.

If you're interested in using gcc-4.7 you have to add some regular expressions to match the new output.
This is done in the Settings -> Compiler -> Other -> Advanced options -> Output parsing.

p.s. Please next time follow the forum rules and post some info about your os/compiler/c::b versions. Our supplier of magic balls is out of stock and we are unable to guess all this info! :-P
Title: Re: Missing error message
Post by: stahta01 on April 26, 2012, 05:45:16 pm
Note: In gcc 4.7 Adding the "-fpermissive" compiler flag should stop most of the "required from" items from being errors.

Tim S.
Title: Re: Missing error message
Post by: candy.chiu.ad on April 26, 2012, 06:24:16 pm
Thanks and sorry for the missing information.
Title: Re: Missing error message
Post by: oBFusCATed on April 26, 2012, 06:29:59 pm
But you have not provided it again. Why?