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