I just discovered CodeLite and it appears great! But I am having trouble setting up to debug my code with it. I have tried the forum search but every term I can think of is rejected as being too common. So my apologies if this has already been discussed and answered.
This is a Linux project. My workspace consists of several shared objects and a test program, all as separate projects in the workspace. My Makefiles put the test program in a "bin" subdirectory and the shared objects in a "lib" subdirectory. How do I set the LD_LIBRARY_PATH environment variable when my program loads to the directory my shared objects are built to, so that the debugger can load and execute my program?
setting LD_LIBRARY_PATH to load my project's libs
-
- CodeLite Curious
- Posts: 2
- Joined: Sun Feb 22, 2009 9:46 pm
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: setting LD_LIBRARY_PATH to load my project's libs
Hi,
Have u tried setting it from settings -> environment variable?
Create new variable named LD_LIBRARY_PATH with value: /path/to/my/libs:$(LD_LIBRARY_PATH)
Eran
Have u tried setting it from settings -> environment variable?
Create new variable named LD_LIBRARY_PATH with value: /path/to/my/libs:$(LD_LIBRARY_PATH)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 2
- Joined: Sun Feb 22, 2009 9:46 pm
- Contact:
Re: setting LD_LIBRARY_PATH to load my project's libs
Thanks for your prompt response eranif.
I actually found a way to do it in the Project Settings Debugger tab, where I set a command to be passed to the debugger at startup:
set env LD_LIBRARY_PATH = ........
The problem with this solution is that I cannot use CodeLite variables, like $(IntermediateDirectory), to set it to the path according to the Debug or Release build location. Whenever I switch between them I have to go back in there and change it.
The problem with setting it in the IDE settings is that I want to carry the setting with me to other environments. I want to be able to set it in the workspace/project settings. I don't want to tell people they need to configure their IDE settings a certain way to use my project/workspace files.
I submitted a feature request to add something to the Project Settings dialog for this, perhaps under the General tab just under the Command Arguments setting, since they are related parameters.
This is a really nice IDE. Thanks to you and others for contributing it to the community!
I actually found a way to do it in the Project Settings Debugger tab, where I set a command to be passed to the debugger at startup:
set env LD_LIBRARY_PATH = ........
The problem with this solution is that I cannot use CodeLite variables, like $(IntermediateDirectory), to set it to the path according to the Debug or Release build location. Whenever I switch between them I have to go back in there and change it.
The problem with setting it in the IDE settings is that I want to carry the setting with me to other environments. I want to be able to set it in the workspace/project settings. I don't want to tell people they need to configure their IDE settings a certain way to use my project/workspace files.
I submitted a feature request to add something to the Project Settings dialog for this, perhaps under the General tab just under the Command Arguments setting, since they are related parameters.
This is a really nice IDE. Thanks to you and others for contributing it to the community!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: setting LD_LIBRARY_PATH to load my project's libs
I will have a look at it.endim wrote:I submitted a feature request to add something to the Project Settings dialog for this, perhaps under the General tab just under the Command Arguments setting, since they are related parameters.
Another idea that once I thought about it, it to have a settings for each variable: 'Save in workspace' this way user is able to save some of the variables as part of the workspace settings
Eran
Make sure you have read the HOW TO POST thread