Different linking behavior between g++ 4.5.2 and 4.6.1

Andrew Pinski pinskia@gmail.com
Tue Nov 15 18:39:00 GMT 2011


On Tue, Nov 15, 2011 at 9:34 AM, Carlo Pinciroli <ilpincy@gmail.com> wrote:
>
> Dear forum,
>
> I have a problem with linking of a program I have wrote. Instead of giving
> you the entire program, which is pretty large, I have prepared a basic
> example that you can find attached to this message. The example uses CMake
> to compile.
>
> I have three files:

Sounds like --as-needed is the default with the linker you are using.
That is GCC is not the issue but rather the defaults with the distros
you are using are different.

Thanks,
Andrew Pinski



More information about the Gcc-bugs mailing list