Re: [Fxruby-users] FXRuby on QNX
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@kn...> - 2004-02-13 04:16:11
|
On Feb 12, 2004, at 7:06 PM, Joel VanderWerf wrote: > Hi, I've got Fox working on QNX6.2.1, and I've got ruby working, but > FXRuby doesn't build for me. Anybody else try this? > > The problems atm have to so with constness in C++: > > /usr/include/string.h: In function `void * memchr(void *, int, > unsigned int)': > /usr/include/string.h:125: declaration of C function `void * > memchr(void *, int, unsigned int)' conflicts with > /usr/include/string.h:49: previous declaration `const void * > memchr(const void *, int, unsigned int)' here > > ...and more like that > > When you include string.h with __cplusplus defined, these declarations > become inconsistent. I tried a minimal .cpp example (based on > hello.cpp from Fox) that includes "string.h", but couldn't recreate > the problem. So probably something is misconfigured in FXRuby, but > what precisely... That's a new one. Which file(s) from FXRuby is it trying to compile when you get this error message? When you compile code with a C++ compiler, the compiler's supposed to (internally) define the __cplusplus symbol. And what I would expect to see in a header file like string.h, if there is a "C version" of memchr() and a "C++ version" of memchr(), would be something like this: #ifdef __cplusplus // Here's the C++ declaration... const void * memchr(const void *, int, unsigned int); #else /* Here's the C declaration, without const */ void * memchr(void *, int, unsigned int); #endif That is, I'd expect the compiler to see one or the other, but not both! |