日本a√视频在线,久久青青亚洲国产,亚洲一区欧美二区,免费g片在线观看网站

        <style id="k3y6c"><u id="k3y6c"></u></style>
        <s id="k3y6c"></s>
        <mark id="k3y6c"></mark>
          
          

          <mark id="k3y6c"></mark>

          "); //-->

          博客專欄

          EEPW首頁 > 博客 > linux下調用math.h編譯出錯undefinde reference to 'sin'

          linux下調用math.h編譯出錯undefinde reference to 'sin'

          發(fā)布人:machinnneee 時間:2021-06-01 來源:工程師 發(fā)布文章

          如果直接gcc編譯,會出現(xiàn)未定義的情況:

          /tmp/ccbS6FZx.o: In function `main':

          fft.c:(.text+0x71): undefined reference to `sin'

          fft.c:(.text+0x9f): undefined reference to `sin'

          fft.c:(.text+0x25e): undefined reference to `pow'

          fft.c:(.text+0x2d5): undefined reference to `pow'

          fft.c:(.text+0x45e): undefined reference to `pow'

          fft.c:(.text+0x548): undefined reference to `sqrt'

          /tmp/ccbS6FZx.o: In function `Wn_i':

          fft.c:(.text+0x64d): undefined reference to `cos'

          fft.c:(.text+0x674): undefined reference to `sin'

          collect2: error: ld returned 1 exit status

          是因為缺少調用,具體需要添加-lm進行編譯

          gcc a.c -o a -lm

           其中a.c為源代碼,a為編譯后輸出結果, -lm為gcc選項

          在編譯即可。

          *博客內容為網(wǎng)友個人發(fā)布,僅代表博主個人觀點,如有侵權請聯(lián)系工作人員刪除。



          關鍵詞: linux math

          相關推薦

          技術專區(qū)

          關閉