Author Topic: Why C::B strips the lib from the library in the linker options?  (Read 4169 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Hi,

I've a test project which has a main app and one dynamic library.
The library is named lib1, so the resulting file is liblib1.so.
This library can't be linked, because C::B does some magic and removes the lib.
I know why it does it, but isn't this against the C::B's policy -> "never do something (magically) behind the back of the user"?

Can we remove this feature?
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Why C::B strips the lib from the library in the linker options?
« Reply #1 on: May 25, 2011, 10:31:15 pm »
Can we remove this feature?
No, as this is simply a mis-use of the prefix option in the project settings. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Why C::B strips the lib from the library in the linker options?
« Reply #2 on: May 26, 2011, 12:34:31 am »
What prefix option?

p.s. if you misuse something, it should bite you  :lol:
p.p.s. I've seen other people to suffer from this (I think)
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Why C::B strips the lib from the library in the linker options?
« Reply #3 on: May 26, 2011, 06:12:10 am »
What prefix option?
In the project options, on the same tab where you specify the output folder, file name... there are two checkboxes whether you want to automatically add the prefix.

However, I am not even sure if that made it already into the debugger's branch. Probably another merge is needed... I'll take care, but have to access to the repo at the moment. :(
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Why C::B strips the lib from the library in the linker options?
« Reply #4 on: May 26, 2011, 12:43:49 pm »
In the project options, on the same tab where you specify the output folder, file name... there are two checkboxes whether you want to automatically add the prefix.
I don't see how this is related.
BTW, I was bitten again by this "feature" today on my real work project...

However, I am not even sure if that made it already into the debugger's branch. Probably another merge is needed... I'll take care, but have to access to the repo at the moment. :(
There are some changes merged in... (I've two new text boxes with some $target_blabla in them)
BTW: Can you start a topic in the announcement subforum to describe the changes from the users point of view? (I'm not sure what is changed and what to expect).
(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!]