pixelnerve / BlockOpenNI

A c++ wrapper for OpenNI.
46 stars 55 forks source link

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

Open jimmyharris opened 13 years ago

jimmyharris commented 13 years ago

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.

pixelnerve commented 13 years ago

What openni version are you using?

jimmyharris commented 13 years ago

OpenNI 1.1.0.41 .

Nite 1.3.1.5

Avin2's sensor kinect (5.0.1.32).

jimmyharris commented 13 years ago

All of those are binary distributions.

glowa commented 13 years ago

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 commented 13 years ago

I have the same versions as jimmyharris

jimmyharris commented 13 years ago

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.

glowa commented 13 years ago

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

jimmyharris commented 13 years ago

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.

jeremyfromearth commented 13 years ago

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 commented 13 years ago

You can find a fix for this problem here:

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

jimmyharris commented 13 years ago

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