Answer the question
In order to leave comments, you need to log in
How to add LD_LIBRARY_PATH path in c++ code?
There is a program that installs another program. And it also needs to be done so that it indicates the path to the libraries that come with the program being installed.
I did this:
chdir("path/to/library/");
std::system("export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/library/");
Answer the question
In order to leave comments, you need to log in
Thanks for answers! Problem solved easily!
Maybe this will help someone too.
Your program is not a sh script. And a couple of lines:
std::system("export myvar=1");
std::system("echo $myvar");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question