User forums > Using Code::Blocks

getting relative paths to work?

(1/1)

Curmudgeon:

What does c::b determine what to use as the base for relative paths?

I have a perfectly working project which I'd like to convert to relative paths so it can be moved without breaking.
I navigate to the library file and when it asks if I want to use relative paths I answered 'yes'.
It can no longer find the library.


--- Code: ---Linking console executable: Debug\gtest_maind.exe
mingw32-g++.exe: gtest-1.3.0\msvc\Debug\libgtestd.a: No such file or directory

--- End code ---

Should this just work without me having to ask? Is this a bug?

stahta01:
Most paths are relative to the project.cbp location; I am not certain if they all are relative to the project.
Tim S

Edit: Are you specifying the Library name in one spot and the Library search folder in another?
If not, please do it that way; it is the normal way it is done.

Project -> Build Options
Select Target in left hand pane
Tab: Linker Settings
Link Libraries pane is where you add the library name to be used.

Project -> Build Options
Select Target in left hand pane
Tab: Search Directories
Linker pane is where you add the path to libraries.

Curmudgeon:
It seems to be when you specify a relative path to the library but no library search path.
I put in a library as a file name only and a search path and that corrects it.
It really should work either way though.
Thanks for the help.

Navigation

[0] Message Index

Go to full version