C++/Eclipse共享库:为什么g++找不到这个库
C++/Eclipse Shared Library: Why can g++ not find this library?
我正在按照http://tayefeh.wordpress.com/2009/07/06/creating-and-using-a-c-shared-library-with-eclipse-cdt-galileo-and-gnu-c-compiler-and-linker/建立一个共享库。
我已经到了第二步,第16点,但我构建项目的尝试失败了,出现了以下错误:
****生成配置项目UseDLL的调试****使全部正在生成目标:UseDLL调用:GCC C++链接器g++-L"/home/ken/workspace/testlib/Debug"-o"UseDLL"/src/UseDLL.o-ltestlib-l/home/ken/workspace/testlib/Debug/usr/bin/ld:找不到-l/home/ken/workspace/testlib/Debugcollect2:ld返回1退出状态make:***[UseDLL]错误1
有人能告诉我们构建失败的原因吗?目录确实存在,并且ls
显示
[ken@localhost调试]$ls/home/ken/workspace/testlib/Debug/libtestlib.so测试类-o
如果有帮助的话,我运行的是CentOS 6.3。
谢谢,Ken
您应该删除以下内容:
-l/home/ken/workspace/testlib/Debug
它使g++
查找具有该名称的库。
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- 找不到成员对象:没有名为get_event()的成员,也处理多态性和向量
- 为什么野牛仍在使用"int yylex(void)",却找不到"int yylex(YYS
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 找不到QtResource文件中的文件
- VC++本机单元测试,找不到调试符号
- RegGetValue在当前用户下找不到名称
- 带有 -stdlib=libc++ 的 clang++ 9.0.1 找不到<optional>
- c++找不到具有相同哈希的无序集合元素
- 找不到以下加速库:boost_fiber
- 找不到 FLTK(缺少:FLTK_INCLUDE_DIR)
- 设置 Visual Studio for MPI: 找不到标识符错误
- "assimp/config.h"找不到,但它在文件夹中
- 链接器找不到在虚拟类 c++ 中访问的静态字段的符号
- C++系统找不到指定的文件错误
- FindPackageHandleStandardArgs.cmake:137 的 CMake 错误(消息):找不到 Boost (缺少:正则表达式)(找到合适的版本"1.72.0",
- vcpkg 添加新库,但找不到
- Qt 5.11.2 (Clang 8.0 (Apple), 64 位), 找不到 QJSEngine 文件
- 找不到Linux Visual Studio代码C++文件