中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. "); //-->

        博客專欄

        EEPW首頁 > 博客 > linux下調(diào)用math.h編譯出錯(cuò)undefinde reference to 'sin'

        linux下調(diào)用math.h編譯出錯(cuò)undefinde reference to 'sin'

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

        如果直接gcc編譯,會(huì)出現(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

        是因?yàn)槿鄙僬{(diào)用,具體需要添加-lm進(jìn)行編譯

        gcc a.c -o a -lm

         其中a.c為源代碼,a為編譯后輸出結(jié)果, -lm為gcc選項(xiàng)

        在編譯即可。

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



        關(guān)鍵詞: linux math

        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉