Re: Shared library (compilation question)

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

 



On 09/05/07, Luc MAIGNAN <luc.maignan@xxxxxxxxxxxx> wrote:
Hi all,

I have a function written in C. I would like make it shared in a shared
library (.so), so it can be called from an external program. Can anyone
give me parameters of gcc to export my function and generate a .so ?

ANy help would be appreciated


gcc -shared -o libMYLIBRARYNAME.so <etc>

"lib" isn't compulsory, but used when resolving names.

Depending what you're going to use it for and where
it's going to live you may also need to investigate
the LD_LIBRARY_PATH environment variable.
(If the library isn't going into a standard place then
this is needed to tell the system where to look for it,
but it isn't recommended for general use.)

--
imalone


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux