User forums > Using Code::Blocks

Relative path to libraries does not link [SOLVED]

<< < (4/4)

kingfox:

--- Quote from: mandrav on October 24, 2006, 03:50:15 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 ?
--- End quote ---

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?

--- End quote ---

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" ?

Navigation

[0] Message Index

[*] Previous page

Go to full version