# shared libraries



## herbey (Mar 16, 2010)

Hi I'm new with freeBSD and returning to c. I would like to make a program that uses a shared library. Say libMyLib.so. What tools can I use to make my program work. Should I use the GNU or is there a format specific to freeBSD. For example, how do you create a port that uses shared libraries? I would appreciate a general advice and/or some pointers to read more about it, thanks


----------



## TerryP (Apr 5, 2010)

FreeBSD uses GCC and company, so... it's fairly normal. Just google for how to create a shared library with gcc (hint: -shared).

When it comes to ports, you'll find your answer in the porters handbook.


----------

