[ODE] Objective-C++

Shamyl Zakariya zakariya at earthlink.net
Thu Jun 10 09:24:55 MST 2004


I experienced this as well. 'id' is an Objective-C keyword, so 
basically, you have to *hide* ODE from your Cocoa code completely.

The way I did this was to make a C++ simulation class which completely 
encapsulates ODE, and provides accessor methods to set params and 
otherwise do all the work behaind the scenes. Of course, this means you 
can't let your Objective-C/Objective-C++ code see anything like a 
dGeomID or a dReal and so on, but if you design a wrapper object model, 
and typedef your own compatible vector/scalar etc types you can get 
away with it.

it works for me, but YMMV.

shamyl zakariya :: lorem ipsum dolor sit amet,
On Jun 8, 2004, at 4:58 PM, Cameron wrote:

> Hey all,
>
> I'm trying to get ODE running under MacOS X with Cocoa.  It compiled 
> fine, and the examples run, but I'm getting linking errors when adding 
> it to my project.
>
> The problem seems to be XCode not liking ODE using id as a function 
> name.
> I get a flurry of "undefined type 'id'" messages where the id() 
> functions are declared and used.
>
> Does anyone have any experience with this set-up or a possible 
> solution?  I'd really appreciate any insight.
>
> Thanks,
> Cameron
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list