>>>>> "wangsg" == wangsg  <[EMAIL PROTECTED]> writes:

 wangsg> Hello,

 wangsg> Our group tried rt-linux recently, and can not get our C++
 wangsg> program works.  The problem is when we tried to insmod the
 wangsg> object code, it gave all rt function calls (rt_task_init,
 wangsg> rt_task_wait, ...) as unresolved symbols.

 wangsg> Can anyone tell me what's wrong with it and how to fix it? Or
 wangsg> g++ is totally not usable for rt-linux?

You need to put extern "C" around the includes that declare those rt
functions.  The undefined symbols you got were the C++ "mangled" names 
that include argument types in the string.  Plain old C doesn't do
that.

Ideally, any C include file, such as the rt .h files, should have
something like this in it:

#ifdef __cplusplus
extern "C" {
#endif
<body of file>
#ifdef __cplusplus
}
#endif

That way it will compile correctly with either compiler.

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