How to run/debug a program with another dependence

General questions regarding the usage of CodeLite
kipade
CodeLite Curious
Posts: 6
Joined: Thu Nov 01, 2012 11:14 am
Genuine User: Yes
IDE Question: C++
Contact:

How to run/debug a program with another dependence

Post by kipade » Thu Nov 01, 2012 11:23 am

Im a new user of codelite.
I create a library project and then create another executable project which is the client of the first library project.
Here, the output directory of the first library project is not in LD_LIBRARY_PATH, so, if I run the executable program like
LD_LIBRARY_PATH=../Library/ ./testClient
this will be work.
However, I can't run or debug the executable program in codelite, which would complain my library can't be found, eventhough I set environment variables in codelite.
I want to know how to configure codelite and make it work.
And, I don't like to modify system-wide environment variables.

User avatar
eranif
CodeLite Plugin
Posts: 6089
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to run/debug a program with another dependence

Post by eranif » Thu Nov 01, 2012 11:10 pm

Set LD_LIBRARY_PATH in "project settings -> common settings -> environment"

NOTE:
Note that the working directory is set to the project file's path.
So when using LD_LIBRARY_PATH=../Library/ - make sure you are in the correct path

Eran
Make sure you have read the HOW TO POST thread

kipade
CodeLite Curious
Posts: 6
Joined: Thu Nov 01, 2012 11:14 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to run/debug a program with another dependence

Post by kipade » Fri Nov 02, 2012 7:24 am

Thanks for your reply.
I do so, it works. I found its the relative path to output executable file, right?

Post Reply