- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業務經營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯網協會理事單位
- 安全聯盟認證網站身份V標記
- 域名注冊服務機構許可:滇D3-20230001
- 代理域名注冊服務機構:新網數碼
運行環境:
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,而需要由用戶來一一指定。
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP