[lug] making so files

TrentJarvi jarvi at yahoo.com
Fri Jul 7 13:05:54 MDT 2000


Just compile, link and install ;)

libtool --mode=compile gcc $CFLAGS -O2 -c file1.c -o file1.lo;
libtool --mode=compile gcc $CFLAGS -O2 -c file2.c -o file2.lo;
...

libtool --mode=link gcc $CFLAGS -O2 -version-info 1:0:0 -o libgd.la -rpath /usr/lib/ file1.lo file2.lo ...

libtool --mode=install /usr/bin/install -c  libgd.la /usr/lib/

This will create:

/usr/lib/libgd.a
/usr/lib/libgd.la
/usr/lib/libgd.so -> libgd.so.1.0.0
/usr/lib/libgd.so.1 -> libgd.so.1.0.0
/usr/lib/libgd.so.1.0.0

$(CFLAGS) in a Makefile or $CFLAGS in script  are the options passed to gcc (-I -D ...) cut and paste from whatever was happening in the past.

Happy hacking.

On Fri, 7 Jul 2000 andrew at netdelivery.com wrote:

> Well, I've tried a few things with my libgd.so.1 problem, all without
> solving it.  Basically SuSE doesn't provide the so file, so I can't
> do anything with ldconfig to link it.  I downloaded the source for
> the latest libgd (1.8.3) and compiled it, but it still only makes 
> the libgd.a file, not any so files.  The Makefile provided didn't
> have any ready-made selection for making shared libraries, and 
> it was just a Makefile, not a cool ./configure script.
> 
> So, when I have the sources to a library, what magic do I need to do
> to make an so type thing versus a .a type thing?
> 
> --
> Andrew Diederich
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> 

-- 
Trent Jarvi
TrentJarvi at yahoo.com






More information about the LUG mailing list