Author Topic: irrelevant linker options.  (Read 3624 times)

this_is_phil

  • Guest
irrelevant linker options.
« on: October 06, 2008, 10:44:02 pm »
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?
« Last Edit: October 07, 2008, 09:22:55 pm by this_is_phil »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: irrelevant linker options.
« Reply #1 on: October 07, 2008, 04:49: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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ