Author Topic: Relative path to libraries does not link [SOLVED]  (Read 22177 times)

Offline kingfox

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: Relative path to libraries does not link [SOLVED]
« Reply #15 on: October 24, 2006, 04:41:09 pm »
Quote
May I think these two options can add the project's top directory and current compiled file's path into compiler and link path automatically ?

Adds the dirs to the compiler's search paths, not the linker's. Does it make sense to add them to the linker's too?

Yes, I think it's useful for me. But no matter even if it doesn't add them to the linker's. May be I didn't express my idea clearly. Actually, I want to know if I don't specify the path to every item (these items are in current project's directory) in "link libraires" listbox, where will C::B look up this item? In others word, where will C::B think these no-path-specified item should be?

When I add the ".\", the command line will be "mingw32-g++.exe -L..\gccdll -LD:\CodeBlocks\lib  -o .\usedll.exe obj\Debug\main.o    .\gccdll.a" (gccdll.a is the item in the "link libraries" listbox and this file is in current project's directory). And when I remove the ".\" of the items in "link libraries" list, the command line will be "mingw32-g++.exe -L..\gccdll -LD:\CodeBlocks\lib  -o .\usedll.exe obj\Debug\main.o  -lgccdll.a". Why C::B add a "-l" before "gccdll.a" ?