3

I'm new to Linux environment. I'm trying to run my C++ files on Codelite and its giving me error which just won't go. I have a DLL folder of my Dahua SDK. It contains shared .so libraries. I'm getting this error since last 2 days and can't run my project!

./Dahuatest1: error while loading shared libraries: libdhnetsdk.so: cannot open shared object file: No such file or directory

I already tried:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/tarak/Documents/General_NetSDK_Eng_Linux64_IS_V3.48.1.R.170623/NetSDK_Eng_Bin/Demo_Src/DLL

export LD_LIBRARY_PATH

ldconfig

which also includes my DLL folder. But still get the same error.

I also tried to change my path to my folder in ~/.bashrc:

export $PATH=$PATH:/home/tarak/Documents/General_NetSDK_Eng_Linux64_IS_V3.48.1.R.170623/NetSDK_Eng_Bin/Demo_Src/DLL

this too failed!

What should I do to get the output??

In codelite I've set Linker search path as my DLL folder. And compiler 'Include Path' also as my DLL folder

Here's a screenshot of my folder: Project file

DLL folder

1 Answer 1

2

Try

export LD_LIBRARY_PATH=/home/tarak/Documents/General_NetSDK_Eng_Linux64_IS_V3.48.1.R.170623/NetSDK_Eng_Bin/Demo_Src/DLL && ./Dahuatest1

As well, try moving (or better symlinking) you *.so files to a directory where the system automatically looks shared libraries for (e.g. /usr/local/lib)

Sign up to request clarification or add additional context in comments.

3 Comments

bash: ./Dahuatest1: No such file or directory
./Dahuatest1 - is the path to your executable file. I took it from your question. Just modify it to the correct path. As well, put the correct path to "dll" folder after LD_LIBRARY_PATH=
@PhantomLord I have the same problem and did temporary solve it by setting LD_LIBRARY_PATH in environment settings. CodeLite can run executable as expected. However, if I run executable in commandline, it fails. I made .sh that sets LD_LIBRARY_PATH and then starts executable which works. However, I would prefer if I can just compile executable that will search for .so files in path relative to executable path. Is there any way to do that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.