Hello,

i am trying wrap posix skin of xenoai for C++. My problem is, some of the
functions in prhread.h (xenomai posix skin)  are causing me compillation
errors like this:

g++ -c -fpermissive -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT
-D__XENO__ -I/usr/xenomai/include/posix  ThreadXp.cpp
ThreadXp.cpp: In constructor ‘ThreadXp::ThreadXp(int, size_t, int, int,
int, char*, int)’:
ThreadXp.cpp:47:53: error: ‘pthread_attr_setschedparam_ex’ was not declared
in this scope
  pthread_attr_setschedparam_ex (&d_attr, &schedParam);
                                                     ^
ThreadXp.cpp:48:40: error: ‘pthread_attr_setname_np’ was not declared in
this scope
  pthread_attr_setname_np(&d_attr, name );
                                        ^
ThreadXp.cpp:49:46: error: ‘pthread_attr_setfp_np’ was not declared in this
scope
  pthread_attr_setfp_np(&d_attr, floatingPoint);
                                              ^
ThreadXp.cpp: In static member function ‘static void*
ThreadXp::threadEntry(void*)’:
ThreadXp.cpp:198:17: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
  return((void *)code);
                 ^
make: *** [all] Error 1

but most of the pthread functions compile with no problem. I tried to
compile with -v option and i am including the headers of xenomai posix
skin. Inside pthread.h, the error giving functions are encapsulated like
this:

#if defined(__KERNEL__) || defined(__XENO_SIM__)

...

#else /* !(__KERNEL__ || __XENO_SIM__) */

but i my code doesnt define any of these macros. When I try to define them
with -D option, or in file, anohter compilation errors came out.

Can u help me with that?

Ahmet
Gebze Technical University
Computer Engineering Student
_______________________________________________
Xenomai mailing list
[email protected]
http://xenomai.org/mailman/listinfo/xenomai

Reply via email to