Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
"Set program's arguments - Host application" doesn't work
(1/1)
oBFusCATed:
Hello,
I have a problem with the host application option/setup.
Steps:
1. Create console project (named "console") and place it somewhere on disk
1.1. Build project
2. Create shared lib project (named "library") and place it at the same path as the console project ( console.cbp and library.cbp are in the same directory)
2.1. Build project
3. Set the "library" as active project
4. Click Project -> Set program's arguments -> Debug -> Browse -> Choose the debug executable generated for "console" project ( "bin/debug/console")
5. Hit "Build & Run"
The result is this:
--- Code: ---Checking for existence: /home/obfuscated/projects/tests/host_app/test2/bin/debug/liblibrary.so
Executing: bin/debug/console (in /home/obfuscated/projects/tests/host_app/test2/.)
Process terminated with status 127 (0 minutes, 0 seconds)
--- End code ---
Here is the zipped project : http://smrt.is-a-geek.org/codeblocks/test2.zip
I'm seeing this on gentoo linux amd64, C::B 6185 debugger branch (trunk has the same problem).
Jenna:
The problem seems to be that the working dir of the debugger is always set to the projects root-dir, not to the executing working dir you have selected in the properties.
A workaround for the moment:
use bin/release or bin/debug (in your case) as executing working dir, and ./console (for release) and bin/debug/console (for the debug target) as host application.
So running the host app works with the run-button for the release-target and with the debugger (but not the run-button) for the debug-target.
It should be not so hard to fix this, I will look into it.
Jenna:
A much ore simple solution:
leave everything as it is and add the directory where the library is created to the linker search-dirs.
The linker search directories are added to the search-path for dynamic libraries, and so the library can be found by the executable.
oBFusCATed:
--- Quote from: jens on March 14, 2010, 10:01:55 am ---The problem seems to be that the working dir of the debugger is always set to the projects root-dir, not to the executing working dir you have selected in the properties.
--- End quote ---
Should I implement this in the debugger branch?
--- Quote from: jens on March 14, 2010, 10:01:55 am ---A workaround for the moment:
use bin/release or bin/debug (in your case) as executing working dir, and ./console (for release) and bin/debug/console (for the debug target) as host application.
--- End quote ---
I don't fully understand, unfortunately :(
--- Quote from: jens on March 14, 2010, 11:29:04 am ---A much ore simple solution:
leave everything as it is and add the directory where the library is created to the linker search-dirs.
The linker search directories are added to the search-path for dynamic libraries, and so the library can be found by the executable.
--- End quote ---
I think, I've tested this and it haven't worked :(
p.s. is this linux/unix only issue?
Navigation
[0] Message Index
Go to full version