User forums > Help

Static library "lib" prefix.

(1/2) > >>

orefa:
Not sure if this is normal or not, but when I compile a static library named "foo" the resulting product is named "libfoo.a", that is a "lib" prefix is prepended to the name I gave it. I deleted the prefix from the target name in the project options but c::b insists on adding it. Maybe there's a reason for it that I'm not thinking of. Is this intentional or should I report it as a bug?

Ceniza:
That must be intentional. Libraries in GCC start with lib and have the extension .a.

When you try to link a library (specifying -lname_of_the_library) it'll try to find libname_of_the_library.a

So, don't worry, it isn't a bug.

rickg22:
How curious, I reported this as a bug a week ago. Yiannis fixed it in CVS so that codeblocks isn't confused with library names anymore.

orefa:

--- Quote from: rickg22 on September 17, 2005, 04:28:13 am ---Yiannis fixed it in CVS

--- End quote ---

So it won't add "lib" to the library name anymore? That would be better. I just tried to link that "foo.a" in another project but the linker was not actually looking for "libfoo.a" so I had to rename it. A minor problem, but it's better solved than not. :)

mandrav:

--- Quote from: orefa on September 17, 2005, 04:45:33 am ---
--- Quote from: rickg22 on September 17, 2005, 04:28:13 am ---Yiannis fixed it in CVS

--- End quote ---

So it won't add "lib" to the library name anymore? That would be better. I just tried to link that "foo.a" in another project but the linker was not actually looking for "libfoo.a" so I had to rename it. A minor problem, but it's better solved than not. :)


--- End quote ---

Yes, it's fixed.

Navigation

[0] Message Index

[#] Next page

Go to full version