您的位置:首页 > 运维架构 > Linux

在linux上编译cppunit1.12.1出现'undefined reference to `dlclose''的解决方法

2012-03-28 06:40 961 查看
之前没有用过CPPUnit,可是现在的公司在用。为了准备TDD代码道场,今天下载了一份。可刚编译就遇到了问题,查了一下,是原代码包中的配置项错了,现象如下:

运行 ./configure 和make以后,出现错误:

undefined reference to `dlclose'
undefined reference to `dlopen'
undefined reference to `dlsym'


解决的方法是在 ./configure 后面加上参数LDFLAS=‘-ldl’:

make clean
./configure LDFLAGS='-ldl'
make
sudo make install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐