Netbeans cannot open shared library during RUN compilation

everything worked fine, but I was just trying to run my CUDA programs on Linux Ubuntu 12.10 in NetBeans, and I get an error:

dist / Debug / GNU-Linux-x86 / my_cuda_1: error loading shared libraries: libcudart.so.5.0: cannot open shared objects file: no such file or directory

RUN FAILED (output value 127, total time: 191 ms)

projects can build: compile + the link without problems, I can also start it from the command line, but if I try to start it from NetBeans, I get this error. I could run it a few minutes ago, what could happen?

I added my_lib to ld.so.conf.d containing the following text:

/usr/local/cuda-5.0/lib64:/lib
/ Usr / lib
/ Usr / lib 64

Could this be a libcudart.so.5.0 -> licudart.so communication problem? there are two libs in cuda / lib libcudart.so.5.0 (link) and libcudart.so (link) and libcudart.so.5.0.35 (shared lib) why is it complaining about .so.5.0? mayve link like: sudo ln -s / usr / lib / x86_64-linux-gnu / libglut.so.3 / usr / lib / libglut.so needed

This is due to a link to a shared library, I think

root @comp: # echo $ LD_LIBRARY_PATH / usr / lib / nvidia -current: /usr/local/cuda-5.0/lib :: / USR / local / CUDA-5.0 / lib64: / Library

not this: problem? It seems not, because I changed this and all the same error. I specify PATHS, I run ldconfig, I put the export in .bashrc, nothing is the same. the reason is that I cannot load these libraries if the program is launched from the NetBeans GUI, however I run NetBeans as root always

+4
source share
1 answer

add to the project → Properties → Run → Environment

Name: LD_LIBRARY_PATH

Value: $ LD_LIBRARY_PATH: / USR / Lib / NVIDIA Current: /usr/local/cuda-5.0/lib: /usr/local/cuda-5.0/lib64: / Library

Thanks to everyone. I do not know what happened before, as it worked fine.

+9
source

Source: https://habr.com/ru/post/1468777/


All Articles