BlockOpenNI icon indicating copy to clipboard operation
BlockOpenNI copied to clipboard

Examples prior to multi-kinect fail to build on Xcode 3.2.6 OS X 10.6.7

Open jimmyharris opened this issue 13 years ago • 11 comments

While Trying to compile BlockOpenNISkeleton I run across the following errors:\

$(CINDER_PATH)/blocks/BlockOpenNI/src/VOpenNIDevice.cpp:1693: error: no matching function for call to 'xn::Context::CreateProductionTree(xn::NodeInfo)'
$(CINDER_PATH)/blocks/BlockOpenNI/include/OpenNI/XnCppWrapper.h:4811: note: candidates are: XnStatus xn::Context::CreateProductionTree(xn::NodeInfo&)

This error occurs on lines 1713, 1733, and 1753 as well.

Also, there is an error regarding std::exception::exception() and not being able to pass a string to it.

 $(CINDER_PATH)/blocks/BlockOpenNI/src/VOpenNIDevice.cpp:1782: error: no matching function for call to 'std::exception::exception(const char*)'
 /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/exception:59: note: candidates are: std::exception::exception()
 /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/exception:57: note:                 std::exception::exception(const std::exception&)

I don't know if these are because you moved to Xcode 4 but I am currently unable to run xcode 4 on my primary development environment.

Any help is appreciated.

jimmyharris avatar Apr 22 '11 22:04 jimmyharris

What openni version are you using?

pixelnerve avatar Apr 28 '11 09:04 pixelnerve

OpenNI 1.1.0.41 .

Nite 1.3.1.5

Avin2's sensor kinect (5.0.1.32).

jimmyharris avatar Apr 28 '11 15:04 jimmyharris

All of those are binary distributions.

jimmyharris avatar Apr 28 '11 15:04 jimmyharris

I am using Xcode 4.02 and have the same errors while building BlockOpenNISkeleton (I've tried on older MacBook Pro and on new iMac with Intel Core i3 - so I guess hardware is not a problem)

I used http://kinecthesis.bakedmac.com/2011/01/11/installing-openni-kinect-drivers-and-nite-on-mac-os-x-10-6/ guide to install kinect stuff

and

marcinignac 28-Jan-2011 05:43 PM post on http://forum.libcinder.org/#Topic/23286000000584092 to run example

any ideas to solve that problem??

glowa avatar May 12 '11 14:05 glowa

I have the same versions as jimmyharris

glowa avatar May 12 '11 15:05 glowa

I have found the problem but not a specific solution. std::exception(const char *) is a windows specific extension of the C++ standard library. It is not apart of the C++ standard, and is not supported by gcc. I had to replace those lines with the DEBUG_MESSAGE macros present previously. This doesn't accomplish the same thing but it works decently well for my purposes.

jimmyharris avatar May 14 '11 19:05 jimmyharris

OK and what about the first error: No matching function for call to 'xn::Context::CreateProductionTree(xn::NodeInfo)'

glowa avatar May 17 '11 11:05 glowa

xn::CreateProductionTree wants a ref to an xn:NodeInfo object. I was never able to get this to compile properly so I had to roll back the multiple device support. My stable branch should. Compile on os x.

jimmyharris avatar May 17 '11 14:05 jimmyharris

Hello,

First of all, thanks for all of your work on BlockOpenNI. I just finished my first project using a Kinect ( will post to Cinder forum once it is installed ) and since that project is done I thought it would be a good time to update.

After uninstalling all previous drivers and re-installing the most recent versions of Nite, OpenNI & SensorKinect on SnowLeopard, I'm seeing this exact same error. Compilation is halted because there is no method definition for "xnCreateProductionTree" that expects a single param. This method is being called four times in VOpenNIDevice.cpp with only the first parameter being supplied.

Thoughts? Work arounds?

Thanks, ~Jeremy

jeremyfromearth avatar May 20 '11 23:05 jeremyfromearth

You can find a fix for this problem here:

http://forum.libcinder.org/topic/openni-libs-for-kinect#23286000000791013

jeremyfromearth avatar May 21 '11 18:05 jeremyfromearth

Thanks, That was the solution I came up with. I was commenting from my iPhone which made proper formatting challenging.

jimmyharris avatar May 25 '11 21:05 jimmyharris