Author Topic: C::B library name processing policy  (Read 8898 times)

Offline mirai

  • Multiple posting newcomer
  • *
  • Posts: 108
C::B library name processing policy
« on: November 26, 2021, 11:46:10 am »
Hi,

Please remind me what is the policy in C::B for conversion of linked static and dynamic libraries from "<path>lib<name>.<ext>" formulation to "<link_switch><name>"?
When C::B decides to convert "libsomelib.a" to "-Lsomelib" while passing such options to a linker and when to pass directly as defined in project options?

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: C::B library name processing policy
« Reply #1 on: November 27, 2021, 12:42:23 am »
You will need to lookup the linker documentation as C::B is an IDE and the linker does the linking not C::B.

The GNU linker docs are available at https://sourceware.org/binutils/docs/ld/  . The section you want is https://sourceware.org/binutils/docs/ld/Options.html . The two parameters you will be interested in are -l & -L .

Offline mirai

  • Multiple posting newcomer
  • *
  • Posts: 108
Re: C::B library name processing policy
« Reply #2 on: November 27, 2021, 08:11:08 am »
No, C::B is converting project settings to linker commands and the question is when and how does it convert provided library names.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1628
Re: C::B library name processing policy
« Reply #3 on: November 27, 2021, 09:44:50 am »
The processing of library filenames is made in CompilerCommandGenerator::SetupOutputFilenames() at compilercommandgenerator.cpp:648.

Variable PrefixPolicy is loaded with the value in Project -> Properties -> Build targets -> Auto-generate filename prefix.