News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Lib file .a not generated in Fedora

Started by cdavalillo, August 17, 2020, 01:26:20 AM

Previous topic - Next topic

cdavalillo

Hi to everybody

I'm using C::B 20.03 in Fedora 32 64 bits. I'm trying to build a shared library as used to do in windows using C::B. The problem is that I don't see any output file .a after a right build. The .so file is in Debug file as always but after do a deep search there is no .a file in nowhere. So the question is I have miss something, I'm doing something wrong or it is a CodeBlocks error? How do I generate the .a file?

Thanks you in advance.

oBFusCATed

Quote from: cdavalillo on August 17, 2020, 01:26:20 AM
... So the question is I have miss something,...? How do I generate the .a file?
Yes, you miss how the linker/dynamic loaders work on linux. You have to read about it, if you want to do serious development on linux and not be bitten by strange problems.
As a start the linker doesn't need an import lib (*.lib on windows) to link to a dynamic library it can just use the info provided by the .so file.
*.a files are just archives of .o (object) files and they are meant for static libraries. Windows/Microsofts linker/tools reuse the .lib extension for two separate things and this cause lots of confusion unfortunately.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

cdavalillo

 :o ohhhh thanks oBFusCATed so the problem was that I'm just a dummy user from Windows that just start to program in Linux and thinks the things works the same......

But you reply is helpfull thanks you very much....