[rtl] Can't use stuff from stdlib.h or stdio.h? Ack!

That's correct. If you're running X, you can't print directly to the
screen from a real time module. Try using rtl_printf() instead. That'll
print to a log that you can check with the 'dmesg' command from any
terminal. 

{If you want to see it print out while it's running, you'll need
to write the 'hello' to either mbuff or a fifo and have a user space
program dump the contents of mbuff of the fifo to the screen.}

As for the rand(): include math.h, and make sure you link the math library
to your module when you compile it, via the '-lm' gcc option.

-Chuck


On Thu, 22 Feb 2001, Kiran Garimella wrote:

> Hey everybody,
>       I'm pondering over a little problem I'm having with a realtime program
> I'm writing... nothing fancy, just a hello world type program that
> outputs "Hello World" and random times.  However, it seems I can't use
> rand() to generate these random times!  I keep getting errors
> complaining first that rand() was implicitly declared and then that it's
> an "unresolved symbol."  Same errors with printf.  Any ideas why?
> 
>       Thanks in advance,
>               -Kiran
> -- [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/
> 

-- [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/

Reply via email to