c++ makefile找不到hdf5的共享库
c++ makefile not finding shared library for hdf5
我正在Kubuntu上编译一个c++程序,它将使用hdf5库。我已经安装了hdf5库使用
sudo apt-get install libhdf5-7
sudo apt-get install libhdf5-cpp-7
但是当我为程序运行makefile时,我得到
make[2]: *** No rule to make target '/usr/local/lib/libhdf5.so', needed by 'src/libHDF5Wrapper.so'. Stop.
确实在/usr/lib
中没有libhdf5*
-文件。我在hdf5的安装中错过了什么吗?
为了结束这个问题,我把我的评论放在这个答案中:
库在Ubuntu上的正确位置可以通过使用相应包的在线文件列表或通过:
ldconfig -p | grep libhdf5.so
返回:
libhdf5.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libhdf5.so
您的makefile似乎错误地假设库的位置为/usr/local/lib
,因此您需要调整makefile以匹配您计算机上的实际安装位置。
相关文章:
- 将成员变量添加到共享库中的类中,不会破坏二进制兼容性吗
- 是否可以通过C++扩展强制多个python进程共享同一内存
- 在cuda线程之间共享大量常量数据
- 如何从具有移动语义的类对象中生成共享指针
- 在c代码之间共享数据的最佳方式
- 在两个类中共享相同的函数调用,并在不需要时避免空实例化
- 将静态库链接到不带-fPIC的共享库中
- 为什么std::互斥需要很长的、非常不规则的时间来共享
- 使用Boost Interprocess创建托管共享内存需要很长时间
- 使用g++编译hdf5源代码
- 无法在Ubuntu上将共享库与Eclipse链接
- 从python调用openMP共享库时,未定义opnMP函数
- 在为LINUX创建共享库时,如何避免STL的私有/弱副本
- 为什么我的共享库中存在展开符号
- 使用共享指针的函数调用,其对象应为 const
- 具有两个独占锁组的共享锁
- 共享队列的线程安全
- 共享指针和具有自定义删除程序的唯一指针之间的语法差异背后的任何原因
- 多个"常量引用"变量可以共享同一个内存吗?
- c++ makefile找不到hdf5的共享库