Author Topic: Lib file .a not generated in Fedora  (Read 2692 times)

Offline cdavalillo

  • Multiple posting newcomer
  • *
  • Posts: 23
Lib file .a not generated in Fedora
« on: August 17, 2020, 01:26:20 am »
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.
« Last Edit: August 17, 2020, 01:27:58 am by cdavalillo »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Lib file .a not generated in Fedora
« Reply #1 on: August 17, 2020, 02:03:30 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!]

Offline cdavalillo

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Lib file .a not generated in Fedora
« Reply #2 on: August 17, 2020, 04:40:05 am »
 :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....