automake
[Top][All Lists]
Advanced

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

Re: creating shared libraries


From: txie
Subject: Re: creating shared libraries
Date: Fri, 26 Oct 2007 12:27:00 -0400 (EDT)
User-agent: SquirrelMail/1.4.8-4.0.1.el4

> * address@hidden wrote on Thu, Oct 25, 2007 at 10:13:38PM CEST:
>> 1. in Makefile.am:
>> lib_LTLIBRARIES = libSCORECModel.la
>> libSCORECModel_la_SOURCES = \
>>  entities/GEdge.cc \
>> Compiling error:
>> Making all in src
>> make[1]: Entering directory
>> `/users/txie/tmp/FMDB_Automake/SCORECModel/SCORECModel/src'
>> make[1]: *** No rule to make target `GEdge.cc', needed by `GEdge.lo'. 
Stop.
>
> Hmm, that's weird.  Which Automake version are you using?  Have you made
sure the file entities/GEdge.cc exists, and there is not maybe a typo?
>
> You should be able to use the Automake option subdir-objects.  See here
for how to set it, and what it does:
> <http://sources.redhat.com/automake/automake.html#Options>
> Still, if that works, but without it, it doesn't work, then that is a
bug hiding somewhere.
>
>> 2. after make install, it creates some shared library with the
extension
>> of some digits, like libfoo.so.0, libfoo.so.0.0.0. How to avoid
creating
>> these files?
>
> -avoid-version is explained here:
> <http://www.gnu.org/software/libtool/manual.html#Link-mode>
> The concept and benefits of versioning are explained here:
> <http://www.gnu.org/software/libtool/manual.html#Versioning>
>
> Cheers,
> Ralf
>


Hi, Ralf,

Thanks for your patience.

Yes, It works. And I found another solution: using Libtool Convenience
Libraries. Firstly create some .la files in subdirectories, then create
the wanted .la file on the upper directory.

But I have 2 new problems now:
1. My solution works well. But the names of the objective files are changed.
For example, vector.c file is compiled to libutil_la-vector.o file not
vector.o file. How to change the name to vector.o ?

-------------------------------------------
Makefile.am in the lower directory:

noinst_LTLIBRARIES = libentities.la
libentities_la_SOURCES = \
vector.c \
--------------------------------------------

2. I have to write Makefiles in every subdirectories, and specify them in
the configure.ac file. It is boring. Is that necessary?

Regards,

Ting















reply via email to

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