出現下列錯誤訊息時,只要在gcc compiler加上後面的 -lm 即可解決。
Rwh_FilterModule.c:(.text+0x1412): undefined reference to `sqrt'
Rwh_FilterModule.c:(.text+0x1430): undefined reference to `cos'
Rwh_FilterModule.c:(.text+0x144a): undefined reference to `sqrt'
Rwh_FilterModule.c:(.text+0x1468): undefined reference to `sin'
Rwh_FilterModule.c:(.text+0x16d4): undefined reference to `cos'
Rwh_FilterModule.c:(.text+0x1718): undefined reference to `cos'
collect2: ld returned 1 exit status
[Victoria@victoria filt_tmp]$ gcc main.c Rwh_FilterModule.c -o test -lm
文章標籤
全站熱搜
留言列表