作者htl (12/26~30雄友週)
看板b93902HW
標題[討論] cos, round
時間Thu Dec 22 17:19:57 2005
我在程式裡用math.h的cos和round
用gcc在工作站編譯出現如下訊息
/tmp/ccKNB6Ep.o: In function `DCT':
a.c:(.text+0x2d7): undefined reference to `cos'
a.c:(.text+0x329): undefined reference to `cos'
a.c:(.text+0x3ad): undefined reference to `lround'
collect2: ld returned 1 exit status
請問是怎麼回事?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.30.40
推 CorruptAngel:gcc lala.c -lm 12/22 17:29
→ CorruptAngel:不然他link不到 12/22 17:29
推 usoko:用g++就好啦 12/23 01:51