User forums > General (but related to Code::Blocks)

C::B library name processing policy

(1/1)

mirai:
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?

AndrewCot:
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 .

mirai:
No, C::B is converting project settings to linker commands and the question is when and how does it convert provided library names.

Miguel Gimenez:
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.

Navigation

[0] Message Index

Go to full version