This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ linked statically?


On 2009-05-26 20:44, Piotr Borys wrote:
> Here it is, full output:
...
> main.o serial.o -Bstatic -lstdc++ -Bdynamic -lstdc++ -lm -lc -lgcc_s
> -lgcc -lc -lgcc_s -lgcc

There's your problem, the '-lstdc++' option is specified twice, once
just after -Bstatic, then after -Bdynamic, and (as far as I know) the
last option takes precedence.  So libstdc++ is still dynamically linked
in this case.

This is because you are using g++, which automagically adds the
-lstdc++.  So please try using 'gcc' instead of 'g++'.

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]