avatar
请教,关于g++ -l的问题# Programming - 葵花宝典
P*e
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
avatar
v*u
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 .
avatar
P*e
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 .

avatar
p*f
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

avatar
c*x
5
copy it to your local project directory. a quick fix.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。