c-library

Hello there,

I just tried to use the sin() function of the math libraries (#include
<math.h>) but it doesn’t seem to compile properly. some other functions from
the same library are not accessible either.

I tried to compile the program with “qcc” first. When compiling it with
“QCC” (capital letters) it works fine and I get the right results. Is there
maybe no “sin()” function for the normal c-library available but just for
C++? Where can I get the library for C?

Thanks.

Nnamdi

Did you try -lm? It will link with libm…

Try linking in the math libs:

qcc -lm -o [program] something.c

Regards,
Francois

Nnamdi Kohn <nnamdi.kohn@tu-bs.de> wrote in message
news:9tb861$an$1@inn.qnx.com

Hello there,

I just tried to use the sin() function of the math libraries (#include
math.h>) but it doesn’t seem to compile properly. some other functions
from
the same library are not accessible either.

I tried to compile the program with “qcc” first. When compiling it with
“QCC” (capital letters) it works fine and I get the right results. Is
there
maybe no “sin()” function for the normal c-library available but just for
C++? Where can I get the library for C?

Thanks.

Nnamdi

Thanks. That was it.

Nnamdi

“Francois Desautels” <tools@qnx.com> schrieb im Newsbeitrag
news:9tb8pg$990$1@nntp.qnx.com

Try linking in the math libs:

qcc -lm -o [program] something.c

Regards,
Francois

Nnamdi Kohn <> nnamdi.kohn@tu-bs.de> > wrote in message
news:9tb861$an$> 1@inn.qnx.com> …
Hello there,

I just tried to use the sin() function of the math libraries (#include
math.h>) but it doesn’t seem to compile properly. some other functions
from
the same library are not accessible either.

I tried to compile the program with “qcc” first. When compiling it with
“QCC” (capital letters) it works fine and I get the right results. Is
there
maybe no “sin()” function for the normal c-library available but just
for
C++? Where can I get the library for C?

Thanks.

Nnamdi
\