how to build shared library link to a static library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi GCC team member,
I am using 64 bit Linux.
I have a library : libstatic.a, which has function: sfun();
I need to build a library: libshared.so, which uses sfun(); but I got error “ `.rodata' can not be used when making a shared object; recompile with -fPIC”
Add -fPIC to libstatic.a Makefile could resolve the issue.
libstatic.a team reject to add this option, and they told me -fPIC is only for shared library.
I checked gcc document, it shows -fPIC is for shared library too.
Could you tell me how to resolve my problem? What’s the official way to link a static 64 bit library to a shared 64bit library?

Thanks,
Wendy

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux