[Top][All Lists]

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

Creating dynamic libraries

From: Matthew Laird
Subject: Creating dynamic libraries
Date: Wed, 30 Jun 2004 11:35:32 -0700 (PDT)


I've been trolling around google and the mailing list archives and can't 
find the answers I'm looking for, so hopefully this is the right place to 

I'm trying to extend a package by allowing it to crease shared dynamic
libraries which I plan to link against in a perl package.  I've found a
way to create what I want, but upon reading a bit I've found it's probably
not portable beyond linux, so I'm trying to determine the "right way" to
do it.  Everything I've read indicates I should use libtool, but I'm
having trouble determining exactly how to get libtool to make shared
dynamic libraries.

I've currently modified this package's existing to have the 
following line: $(OBJS)
        $(CC) -shared -Wl,-soname, -o $(OBJS)

>From what I understand .so is very linux-centric.  How would I create 
something more portable?  Or even configure things so a dynamic library is 
only created when supported by the OS?

This package already has the following section:
libhmmer.a: $(OBJS)
        $(AR) libhmmer.a $(OBJS)
        $(RANLIB) libhmmer.a
        chmod 644 libhmmer.a

Which again, I'm unsure of the portability of this.

Any advice would be welcome.  Thanks.

Matthew Laird
SysAdmin/Web Developer, Brinkman Laboratory, MBB Dept.
Simon Fraser University

reply via email to

[Prev in Thread] Current Thread [Next in Thread]