Author Topic: Question about linker search directories  (Read 3681 times)

sh_roohani

  • Guest
Question about linker search directories
« on: September 25, 2007, 03:06:18 am »
Hi,

I have compiled PDCurses on Win32 with MinGW and then added my PDCurses win32 dir to linker

search directories through Settings>Compiler and debugger...>Global compiler settings>Search

directories>Linker. Then I created a Win32 console project and added pdcurses.a to my

project's build options through Project>Build options...>Debug>Linker settings>Link

libraries. Then CB asks if I want to keep it as a relative path!

Shouldn't I be able to give only lib name (without path) and expect the IDE to call gcc with proper '-L' options to search for added libs?

Otherwise if I add the lib with its absolute or even relative path and hand over this CB

workspace to someone else, he will have to change the project settings based on his own

paths. I think it makes no sense when we define linker search directories in the IDE. Please let me know if

I'm wrong.

Thanks.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Question about linker search directories
« Reply #1 on: September 25, 2007, 03:28:25 am »
Shouldn't I be able to give only lib name (without path) and expect the IDE to call gcc with proper '-L' options to search for added libs?
Yes; merely give the name of the library and ensure that the correct search path appears in the linker tab of your project's Search directories.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)