Hello everyone on this mailing list.
David J. Christini posted the following message:
From: "David J. Christini" <[EMAIL PROTECTED]>
Subject: [rtl] how to use sin() or exp() from math.h in rtl?
Date: Mon, 1 Feb 1999 20:44:31 +0000 ( )
> I know this has been covered before, but I couldn't find it in the list
> archive. Why can't I use functions such as sin() or exp() from math.h in
> my rt_process? I get the following error when I try to insert my
> rt_process.o which contains a call to exp():
>
> insmod rt_process.o
> rt_process.o: unresolved symbol exp
You need to use `gcc' with a `compile only option(-c)'.
And then, use `ld' for linking with these parameters:
`-L/usr/lib -r -Bstatic -lc -lm'.
The point is `-Bstatic'; that means "gcc links objects and
libraries staticaly." And you get the sin(), exp() and such
library functions included into your module.
Please note that most programs on Linux use `shared library'
functions by default. You need to specify explicitly to link
objects and libraries staticaly.
> Is there a way to get around this? Do I need to explicitly place the
> code for exp() within my rt_process.c?
Of course, you don't need it, except the case you need to make
modules tuned up.
I hope this message is useful.
Hideto Ishibashi
// Hideto Ishibashi <[EMAIL PROTECTED]>
// http://vip.cis.kurume-nct.ac.jp/~s34204/
// Kurume National College of Technology, Japan
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/