Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: *ptr on September 29, 2005, 07:36:17 am

Title: static lib naming - Why is prefixed with "lib" the name I give?
Post by: *ptr on September 29, 2005, 07:36:17 am
Hi.

Can somebody help me? Please. When I try to make a static lib project on linux (debian/ubuntu/fedora), and I specify
the output file name like dbg/smplfsys.a, and tell to C::B that is a static lib, why after compilation he makes:
ar -r dbg/libsmplfsys.a .objs/full/smplfsys.o
after that try to run ranlib in a normal way like:
   ranlib dbg/smplfsys.a
Of course, I get the following error.
ranlib: 'dbg/smplfsys.a': No such file

If can somebody tell me how to tell the linker from C::B to make my lib with the name that I specify
in the "output filename" field

Many Thanx Beforehand
*ptr
Title: Re: static lib naming - Why is prefixed with "lib" the name I give?
Post by: mandrav on September 29, 2005, 08:46:20 am
Go to Settings->Compiler->Other and see what's the build method. Direct or make?
Title: Re: static lib naming - Why is prefixed with "lib" the name I give?
Post by: *ptr on September 29, 2005, 08:59:53 am
Thanks for suggestions Yiannis.
But I need to invoke the compiler directly. (I work on a project that converts some makefiles to C::B prj files).

But meanwhile I found under the Advanced Compiler Settings, under the others tab, have a field named:
Library prefix (e.g. lib):
which was set to "lib". I remove the specified string, and now I can build my lib correctly.

It's my fault, I guess C::B have a lots of goodies inside, just to know how to work with these.....

Anyway, C::B is the BEST IDE!!!

Thanx again