Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Linking to the non system libcodeblocks.a on Linux?

(1/2) > >>

oBFusCATed:
Hello,
Here is my setup:
1. I have locally modified source tree for the debuggers branch, built with codeblocks
2. I have a plugin, which I want to build against the modified version of C::B
3. I have installed version of C::B which has different SDK, than the local version
4. The plugin is setup to run the modified C::B as a host

The problem is that when I've modifications to the SDK, C::B refuses to start, when I hit run/debug->start in the plugin project.
I'm not sure what is the exact problem. Using the run.sh shell script works or running C::B from inside C::B used to build C::B works, too.
Also, I have the strange feeling that my plugin is not loaded correctly, I'm making obvious changes to the code, but they are not reflected :(

What can I do to improve the situation?
1. Install the modified SDK lib, this is the obvious solution, but the iteration time is extreme
2. Move libcodeblocks to a non system path and probably use rpath
3. Use the version numbers for the lib
4. Rename the lib, when building from C::B

Jenna:
I would try the second solution (rpath), because it seems the easiest way to set up.
If it does not work, try to set LD_LIBRARY_PATH with the environment variable plugin.

oBFusCATed:

--- Quote from: jens on October 21, 2011, 01:09:53 pm ---I would try the second solution (rpath), because it seems the easiest way to set up.

--- End quote ---
What should I change? The autotools files or the Codeblocks-unix.cbp
If it is autotools, where/what/how?


--- Quote from: jens on October 21, 2011, 01:09:53 pm ---If it does not work, try to set LD_LIBRARY_PATH with the environment variable plugin.

--- End quote ---
This doesn't work, I've tried it. And I don't know why it doesn't work :(
But I know that the env plugin works for host apps/share library projects, because I'm using it at work!
When using the debugger, Codeblocks calls exit somewhere in the IMPLEMENT_APP macro :( I don't think it reaches the main function.

Jenna:
Adding

--- Code: ----Wl,-rpath=/path/to/codeblocks-root/src/devel
--- End code ---
to the src-targets "Other linker options" (of the modified C::B) works for me.

Using LD_LIBRARY_PATH with envvar-plugin also works, but I had to manually activate the checkbox after modifying it.

oBFusCATed:
Patch? Do you change the C::B or the plugin?

Edit: -rpath in the src target in Codeblocks-unix.cbp does it (but it is not working 100% O_O)
Now I have to correctly link the libcodeblocks.a, do you know how. This is in the external plugin project?

Navigation

[0] Message Index

[#] Next page

Go to full version