User forums > Using Code::Blocks
problems linking libraries [SOLVED]
yop:
--- Quote from: sspecter on February 11, 2006, 06:27:08 pm ---How i can use this -rpath?
--- End quote ---
In your case (now that it's clear) you don't need it. Mandrav's advice is what you need.
sspecter:
Thanks for the help
Then... Is there a way to add system paths in codeblocks? So that when my program runs the path is added?
If dont, there is any way to load libraries in another directory (without adding system paths)?
tiwag:
--- Quote from: sspecter on February 11, 2006, 09:16:30 pm ---... Is there a way to add system paths in codeblocks? ...
--- End quote ---
actually no :-(
but i had a similar need and "solved" it by the following workaround :
create a cmd-script and set your needed path(es) there to your PATH environment variable,
i use scripts something like the following
--- Code: ---@if "%ENVMYXYZAPP%" == "" (
set ENVMYXYZAPP=SET
echo Setting my environment for xyz app ...
set PATH=D:\my\path\for\xyz\app;%PATH%
start D:\programme\codeblocks\codeblocks.exe d:\devel\xyz\xyz.cbp
)
--- End code ---
which works with Windows XP well,
you can look at the attached project, which i used in former times
for testing the debugger, but it uses two dll's in separate subdirectories,
there is one start_cb_???.cmd to start the ide with the workspace,
and one start_???.cmd to test the executable without ide.
look at that files and you'll get the idea
[attachment deleted by admin]
mandrav:
Even if there was a way, your app would run fine inside C::B but would fail to run outside of C::B (on its own)...
I suggest you re-think your project's (folder) layout...
Navigation
[0] Message Index
[*] Previous page
Go to full version