static linking c libraries

Israel Fdez Cabrera israel@seg.inf.cu
Wed May 21 14:33:00 GMT 2003


Ok, I'll test it, I use KDevelop and I dont know where to put this options but 
I'll serch... thaks very much

On Wednesday 21 May 2003 10:28 am, Eljay Love-Jensen wrote:
> Hi Israel,
>
> Try this, assume you have:
> libstdc.a and libstdc.so
> libstdc++.a and libstdc++.so
> libm.a and libm.so
> libfoo.a and libfoo.so
> libbar.a and libbar.so
>
> gcc -o myapp \
>   $(MY_OBJS) \
>   -Wl,-nostdlib \
>   -Wl,-Bdynamic -lfoo \
>   -Wl,-Bstatic -lbar \
>   -Wl,-Bstatic -lstdc++ \
>   -Wl,-Bdynamic -lstdc \
>   -Wl,-Bstatic -lm
>
> I'm just guessing as to the proper order.
>
> --Eljay

-- 
Israel Fdez Cabrera.
Usuario Linux: 270292	(http://counter.li.org)
israel@seg.inf.cu
Segurmatica.
La Habana, Cuba.




More information about the Gcc-help mailing list