Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: spectrum on January 11, 2011, 11:22:38 am

Title: C::B 10.05 and gcc-4.5.0, libstdc++.a not linked
Post by: spectrum on January 11, 2011, 11:22:38 am
Hi all,

i installed C::B 10.05, that was bringing inside MINGW and gcc 4.5.0.

After i compiled a c++ applications, once linking, there are many undefined references to std c++ library functions.

I tought that the linking with the std c++ library should be done automatically when g++ is used. And this was working with previuos C::B version.

Any help is appreciated.
Regards,
angelo 
Title: Re: C::B 10.05 and gcc-4.5.0, libstdc++.a not linked
Post by: stahta01 on January 11, 2011, 04:47:29 pm
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Title: Re: C::B 10.05 and gcc-4.5.0, libstdc++.a not linked
Post by: spectrum on January 14, 2011, 01:13:15 pm
sorry,

but this answer solved nothing.

I have unresolved externals errors to std c++ library functions, due to libstdc++.a not linkrd, and this with the previous version of code::blocks+mingw was not happening.

Enabling compiler log, libstdc++.a is clearly not linked. Adding manually the library in the project linker command, errors disappear.

regards
angelo
Title: Re: C::B 10.05 and gcc-4.5.0, libstdc++.a not linked
Post by: oBFusCATed on January 14, 2011, 01:36:23 pm
If the commands used by C::B to compile your code are correct, you have a broken compiler installation, so this is not a C::B problem.

The C::B team is not responsible for the compiler you use, even if there is a bundle (C::B + mingw) downloadable on the site.
Title: Re: C::B 10.05 and gcc-4.5.0, libstdc++.a not linked
Post by: Jenna on January 14, 2011, 08:19:35 pm
If you have multiple installations of MinGW, make sure, that none of them is in \MinGW on any of your drives.