P********e 发帖数: 2610 | 1 小弟初学linux prog, 大虾帮忙看一下:
g++ a.cpp b.cpp -lcad
我想连一个libcad.la的文件,编译没错误
运行./a.out
error message: ./a.out: error while loading shared libraries: libcad.so.1:
cannot open shared object file: No such file or directory |
v**u 发帖数: 20 | 2 where is your libcad.la file? You need let Linux know how to load it, you
can use ldconfig command after add the libcad.la path to its config file or
you can put your libcad.la file in your current dynamic library path, for
example /usr/lib . |
P********e 发帖数: 2610 | 3 it's on university's server, I don't have right to change any of those you
mentioned.
Any other solution?
thanks.
or
【在 v**u 的大作中提到】 : where is your libcad.la file? You need let Linux know how to load it, you : can use ldconfig command after add the libcad.la path to its config file or : you can put your libcad.la file in your current dynamic library path, for : example /usr/lib .
|
p****f 发帖数: 251 | 4 Add the path of the library to LD_LIBRARY_PATH.
【在 P********e 的大作中提到】 : it's on university's server, I don't have right to change any of those you : mentioned. : Any other solution? : thanks. : : or
|
c********x 发帖数: 84 | 5 copy it to your local project directory. a quick fix. |