[Top][All Lists]

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

RE: shared libraries and automake

From: Eric Ray
Subject: RE: shared libraries and automake
Date: Mon, 1 Apr 2002 08:16:34 -0600

Okay, let me rephrase the question.

How can I generate a shared library without using libtool and then link
to it.

when defining the library like so

i get the following error when running automake

automake: `' is not a standard library name

and then automake exits without generating

So, what I want to do is generate a .so library, not a .la and I then
want to link that .so to create an executable.

here's the entire


STD_COMP_OPT = -ansi -std=c99


libSomeLib_so_SOURCES = LibFile1.cpp LibFile2.cpp
bin_PROGRAMS = main

main_SOURCES = main.cpp
main_LDADD =


> -----Original Message-----
> From: Alexandre Duret-Lutz [mailto:address@hidden
> Sent: Monday, April 01, 2002 8:05 AM
> To: Eric Ray
> Cc: address@hidden
> Subject: Re: shared libraries and automake
> >>> "Eric" == Eric Ray <address@hidden> writes:
>  Eric> is it possible to link to a non-libtool generated 
> shared object in the
>  Eric>
>  Eric> for example, instead of
>  Eric>
>  Eric> is there another command to use a regular .so file?
>  Eric> lib_LIBRARIES only appears to work with static 
> libraries.  I can find no
>  Eric> documentation in the Automake manual that describes how to use
>  Eric> non-libtool libraries.
> _LTLIBRARIES and _LIBRARIES are used to *produce* libraries. 
> If all you want is to link with a .so file which already exists
> (or for which you have supplied your own building rules), you
> can use _LDADD:
> bin_PROGRAMS = foo
> foo_SOURCES = foo.c foo.h
> foo_LDADD = pathto/
> Alternatively, you can play with the -L and -l linker flags
> bin_PROGRAMS = foo
> foo_SOURCES = foo.c foo.h
> foo_LDADD = -Lpathto -lyours
> but this second form won't handle dependencies (in case
> pathto/ is built in the same project) automatically.
> (All of this remains true for any kind of libraries, e.g. static
> libraries or libtool libraries.)
> HTH,
> -- 
> Alexandre Duret-Lutz

reply via email to

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