のぐち@市川市です。
#かなり、FAQな気が・・・
From: powerpc _at_ post1.com
Subject: [linux-users:40760] slackware3.5 でcの勉強 しかしsinが出ない ...
Date: Thu, 10 Dec 1998 01:04:42 +0900
> こんな感じなのですが、cc 1.cとすると
>
> /tmp/cca177741.o: In function `main':
> /tmp/cca177741.o(.text+0xe): undefined reference to `sin'
> collect2: ld returned 1 exit status
>
> というエラーがでます。
> sinが定義されてないぜ。といわれているようなのですが...
> これはmath.hがないor壊れているのでしょうか??
sin関数を使用するには、mathライブラリをリンクしなければ
なりません。
% cc 1.c -lm
~~~
です。
----
e-mail: noguchi _at_ t-mue-needs.gr.jp
References:
- Prev by Subject: [linux-users:40760] slackware3.5 でcの勉強 しかしsinが出ない...
- Next by Subject: [linux-users:40762] Re: [Q] About egcs on Slackware 3.5 (Was [Q] About egcs options)
- Previous by thread: [linux-users:40760] slackware3.5 でcの勉強 しかしsinが出ない...
- Next by thread: [linux-users:40765] Re: slackware3.5 でcの勉強 しかしsinが出ない...
- Indexes:[Main][Thread]