News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Missing error message

Started by candy.chiu.ad, April 26, 2012, 04:11:28 PM

Previous topic - Next topic

candy.chiu.ad

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


stahta01

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

candy.chiu.ad

But the code didn't successfully compile, and therefore, is not executable.  How should I configure CodeBlocks to get rid of the "errors"?

oBFusCATed

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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Note: In gcc 4.7 Adding the "-fpermissive" compiler flag should stop most of the "required from" items from being errors.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

candy.chiu.ad

Thanks and sorry for the missing information.

oBFusCATed

But you have not provided it again. Why?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]