including self-made libraries

Bram Kuijper a.l.w.kuijper at rug.nl
Mon Jun 18 13:31:58 UTC 2007


Hi all,

I have a number of self-made static libraries on my ubuntu system, but 
its difficult to let g++ find them. I work on a Ubuntu 7.04 feisty box.

I made the library blah.a in some directory. However, according to get 
it included in gcc's -l string, I need to rename it into libblah.a, with 
the lib prefix. Is there any other way to get my self-made libraries 
included without renaming them all to lib$mylibraries.a?

According to the gcc-manual, I can do include libraries without the lib 
prefix, by specifiying just the object name without the -l prefix. 
However, if I do this, then I need to specify the full path for each 
static library I want to include, since the -L prefix is not followed 
for looking up the library name.

anybody a handier approach to include my self-made libraries?

thanks in advance,

Bram Kuijper






More information about the ubuntu-users mailing list