News:

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

Main Menu

irrelevant linker options.

Started by this_is_phil, October 06, 2008, 10:44:02 PM

Previous topic - Next topic

this_is_phil

I have been following tutorials for using SDL and have passed linker options to the global compiler and debugger settings. I was wondering whether the specified libraries would be linked if they weren't used in the project, such as if I were to write a program which didn't use the SDL libraries, would they still be linked?

MortenMacFly

Quote from: this_is_phil on October 06, 2008, 10:44:02 PM
which didn't use the SDL libraries, would they still be linked?
Depends on the linker. Most linker won't use the import library in that case. But: You might get an error with duplicate/incompatible symbols (e.g. different "main" styles). So it's always worth to keep your project setup clean.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]