ofTheo / ofxKinect

legacy openFrameworks wrapper for the xbox kinect (OF pre-0.8.0+ only) - ofxKinect is now included and is being maintained in OF releases
MIT License
540 stars 105 forks source link

confit with ofxOsc (int32_t) #64

Closed lmfr74 closed 13 years ago

lmfr74 commented 13 years ago

I'am using a project with ofxKinect and ofxOsc and there is a conflit with the defined type int32_t in ofxOsc when using ofxKinect. The ofxKinect has a dependency on stdint.h that has an defined int32_t. I'am using VS2010 and OF 0.062.

Error 1 error C2371: 'int32_t' : redefinition; different basic types c:\dev\openframeworks\0.062\addons\ofxosc\src\ofxoscarg.h 76 1 cube.vision

Probably that is something to solve in the side of ofxOsc? thanks!

danomatika commented 13 years ago

Just comment the definition out in ofxKinect.h for now. We will need to check the definition before defining it for a fix.

lmfr74 commented 13 years ago

Sorry, i was not clear about the problem. ofxKinect includes "libfreenect.h" and libfreenect.h includes "stdint.h" that defines the int32_t. int32_t is then redefined in ofxOsc.

Luis

danomatika commented 13 years ago

I've been using ofxKinect and ofxOsc together for quite a while now. Are you compiling on windows? Visual Studio versions before 2010 did not come with stdint.h, so those types had to be defined in cross platform code. Now that the new versino does, some of this older code breaks due to the redefinition,

You are right, this is a bug in ofxOSC in ofxOscArg.h on lines 73-76:

#if defined TARGET_WIN32 && defined _MSC_VER
// required because MSVC isn't ANSI-C compliant
typedef long int32_t;
#endif

Comment that code block out for now and it should build. I'm submitting a bug report to openframeworks and closing this as it's not an ofxKinect problem.

https://github.com/openframeworks/openFrameworks/issues/559