在linux上編譯cppunit1.12.1出現'undefined reference to `dlclose''的解決方法

之前沒有用過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



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章