Flex and libfl.so (SVN 20080603/ uclibc)

marty marty at goodoldmarty.com
Tue Jul 29 07:30:48 PDT 2008

>> >
>> > Following the current flex build instructions produces libfl.a instead of
>> > libfl.so as mentioned in the book (chapter 6.38).
>> >
>> > How can I get a shared version of libfl ?
>> >
>> > Daniel
>> > --
> As far as I was able to tell, flex does not generate a shared library.
> What I do is manually create a libfl.so via the following noise:
>  gcc $CFLAGS -fpic -fPIC -Wl,-soname,libfl.so.2 -o libfl.so.$version
> ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o
> sym.o tblcmp.o yylex.o
> where $version is the particular version of the library

or put libfl.a in a separate directory.
ar -x libfl.a     to extract the objects from the archive
gcc -shared *.o -o libfl.so   to build the shared lib.

> and then take care of the symlinkage:
>   cp -v libfl.so.$version /lib/
>   ln -vsf libfl.so.$version /lib/libfl.so.2
>   ln -vsf libfl.so.2 /lib/libfl.so

Electile Dysfunction : the inability to become aroused over
any of the
choices for President put forth by either party in the 2008

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20080729/7523bb45/attachment.sig>

More information about the hlfs-dev mailing list