Re: Creating/using shared libraries

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

 



Frank wrote:
Trying to move from archive to shared libraries for an application. I believe I was able to create the shared library ok by compiling the .cpp's with -fpic and using g++ -shared with the objects (.o's). But when I try to compile a program that used that library I get a undefined reference from the shared library about an archive library object that it was compiled with (it was included on the link fro both the shared lib and the executable). Is there some other option/procedure I need to do to use the shared library?

Any good reference to understand how to build and use shared libraries. I'm using GNU gcc/make


http://vergil.chemistry.gatech.edu/resources/programming/c-tutorial/libraries.html


You still need to link to the static library when building the app.

Hope I've understood you correctly.

Cheers,
Rob

--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.



[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