automake
[Top][All Lists]
Advanced

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

Creating a shared object rather the a static library


From: Jeff Safier
Subject: Creating a shared object rather the a static library
Date: Tue, 27 Feb 2007 09:30:21 -0500

 So, I realized my mistake and I can use libtool.

However when I make my library I install it in /usr/local/lib.  I am now
however having trouble linking it to my project.  I get an error that it
cant find the library and it seems to be looking in a .lib folder under
the project folder

Can I direct the linker as where to find the library without specifying
the path within the LDADD line of my Makefile.am?

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Russ Allbery
Sent: Tuesday, February 27, 2007 2:07 AM
To: address@hidden
Subject: Re: Creating a shared object rather the a static library

Jeff Safier <address@hidden> writes:

> Not using libtool, how would I create a shored object.  automake seems

> to be defaulting to creating a static library

Far and away the easiest answer to this question is "start using
libtool,"
particularly if you're already using Automake, since all of the Automake
magic assumes that you're going to use libtool to create that sort of
object.  If you're assuming gcc, you could write rules by hand to use
-shared, or you might be able to hack around Automake by putting -shared
into an appropriate Automake compiler flag variable, but you're really
going behind Automake's back and breaking assumptions.

-- 
Russ Allbery (address@hidden)
<http://www.eyrie.org/~eagle/>






reply via email to

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