久久青草精品A片狠狠,日韩欧美视频一区二区,亚洲国码AV日韩,国产精品黄在

幫助中心 >  技術知識庫 >  云服務器 >  服務器教程 >  linux下解決Unixbench安裝報錯信息的問題

linux下解決Unixbench安裝報錯信息的問題

2019-11-28 16:56:33 5848

運行環境:


Ubuntu 16.04.3 x86_64


在Ubuntu下安裝運行Unixbench時,提示報錯信息如下


gcc -o ./pgms/ubgears -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/ubgears.c -lGL -lXext -lX11 

/usr/bin/ld: /tmp/ccnTgDEZ.o: undefined reference to symbol 'sincos@@GLIBC_2.2.5' 

//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line 

collect2: error: ld returned 1 exit status 

Makefile:240: recipe for target 'pgms/ubgears' failed 

make: *** [pgms/ubgears] Error 1

通過查閱資料,由于ubgears.c中會用到數學函數,而實際運行時找不到對應的數學函數,只需要在顯示調用函數函數庫即可,在Makefile中GL_LIBS 后添加-lm


使用ld -v查看ld工具版本


從binutils2.22開始,ld開始把–no-copy-dt-needed-entries默認打開,這樣一來,ld不會再自動遞歸地解析鏈接的lib,而需要由用戶來一一指定。


提交成功!非常感謝您的反饋,我們會繼續努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務,我們很需要您進一步的反饋信息:

在文檔使用中是否遇到以下問題: