automake
[Top][All Lists]
Advanced

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

Re: Finding library procedures in /usr/local/lib/


From: John Calcote
Subject: Re: Finding library procedures in /usr/local/lib/
Date: Fri, 03 Apr 2009 10:17:14 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2

On 4/3/2009 8:49 AM, Gerald I. Evenden wrote:
On Thursday 02 April 2009 5:56:52 pm Peter Johansson wrote:
Hello Gerald,

Gerald I. Evenden wrote:
After trying so many options related to libraries I am exhausted.

I have a simple program that needs to link with a shared library
installed in /usr/local/lib.

When using my own simple Makefile and simply adding "-lproject -lm"
everything works fine (libproject is the shared library).
LDADD = "-lm -lproject"

in your `Makefile.am' should do it.

Cheers,
Peter

Of the suggestions offered, this one worked in the following literal entry
into src/Makefile.am:

geodesic_LDADD = -lproject -lm
No offense intended to Peter, but this solution works because it simply assumes the library exists on the end-user's system. On systems where it doesn't exist in the default library paths, the build will fail with a linker error. The entire purpose of Autoconf checks is to ensure that the environment is actually able to build the project. If this solution is acceptable to you, then why even bother with configure? Why not simply write a makefile to build your project?

Regards,
John


reply via email to

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