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

LD_LIBRARY_PATH Not Used

(1/3) > >>

Game_Ender:
I am using rev 1658 and I am trying to run an Application from within Code::Blocks that links against libraries in LD_LIBRARY_PATH.  The libraries are in /usr/local/lib and I have edited my .bashrc to include this, so I can run the application manully from the command line fine.  I am compiling with a custom make file and that works fine too.  Yet when ever I try to run the app either as a GUI Application or a Console Application it can't find the libraries.  This happens even if I start Code::Blocks from the same terminal that I am able to run the app manually from.

tiwag:
look there, several possibilities how to solve this ...
http://forums.codeblocks.org/index.php?topic=1779.msg13287#msg13287


run from terminal
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH  ./executable_name


btw - i just now built CB under ubuntu linux and if using the CodeBlocks-unix.cbp project file
i can start my debuggee fine.

maybe with Gentoo it does work slightly modified - can you have a look in your gentoo docs please ?

Game_Ender:
Sorry, I forgot to mention I am using Ubuntu 5.10 Breezy Badger.  I can run the program fine from the terminal without explicitly stating the LD_LIBRARY_PATH.  When I put the LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib in front of the executable name in Project->Target Options dialog Code::Blocks just sits there forever running at 95%-100% CPU usage for way longer than it takes the program to start.  I have also seen that thread you mentioned and I am not trying to run Code::Blocks, only my custom application.

tiwag:
i use also ubuntu 5.10 breezy - don't know why it works for me but not for you ?

Game_Ender:
I have a hack/workaround and I still trying to figure out why it doesn't work:

I renamed console_runner console_runner_prog and created this script called console_runner:

--- Code: ---LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib /home/jlisee/apps/codeblocks-svn/bin/console_runner_prog $*
--- End code ---

So codeblocks invokes the script which invokes the real console runner with the proper LD_LIBRARY_PATH and all the arguments.

Navigation

[0] Message Index

[#] Next page

Go to full version