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

Build errors on OSX #70

Closed cliff76 closed 13 years ago

cliff76 commented 13 years ago

I'm also getting similar build errors as reported in issue #42. I downloaded the master of both open frameworks and ofxKinect. I noticed there are 3 different project files in ofxKinect, "ofxKinect", "ofxKinect-OF007", and "ofxKinect-beta" which each have different targets. I tried to build each target in each proj file and was only successful in building the openFrameworks target in all three. Could you include n00b instructions for getting up and running? I'm assuming my issues are related to version mismatch between ofxKinect and open frameworks but I'm not sure where the disconnect is. Should the master of ofxKinect work out of the box with the master of open frameworks?

danomatika commented 13 years ago

Do not use openframeworks master as that is under development and can be considered unstable. Use the 007 tag instead.

Yes, ofxKinect is messy right now, but the current master will work fine with OF 007. I will clean up the projects shortly.

danomatika commented 13 years ago

Ok, everything is cleaned up. Please re-download and try the OF 007 tag. There's only one project and it's for OF 007.

cliff76 commented 13 years ago

Cool! I'll check it out now.

danomatika commented 13 years ago

Also, if you are using Xcode 4, change the scheme from openframeworks lib to ofxKinectExample. It's the arrow/dropdown box to the right of the Stop button. I didn't get this at first and was wondering why it wasn't building/running ...

cliff76 commented 13 years ago

I checked out 007 from openframeworks and the master of ofxKinect. I still get a bunch of build errors, here's one of them: openFrameworks/addons/ofxKinect/example/../../../addons/ofxKinect/libs/libfreenect/usb_libusb10.c:31:31: error: libusb-1.0/libusb.h: No such file or directory

and here's another: openFrameworks/addons/ofxKinect/example/../../../addons/ofxKinect/libs/libfreenect/libfreenect.h:176: error: expected '=', ',', ';', 'asm' or 'attribute' before 'freenect_usb_context'

cliff76 commented 13 years ago

Just for clarity (b/c I'm no git expert) I ran: git clone https://github.com/openframeworks/openFrameworks.git git checkout 007

Then inside the addons folder I ran: git clone git://github.com/ofTheo/ofxKinect.git

danomatika commented 13 years ago

What system and dev tools do you have? I have none of year issues. Are you cleaning the project before running in case any old build files are left over?

cliff76 commented 13 years ago

I'm running XCode 4.0.2 Build 4A2002a. I was aware of the scheme selection and have managed to build the openframeworks target correctly but I still get errors on the ofxKinect even after a clean.

CliffMac:openFrameworks cliff$ git branch

CliffMac:openFrameworks cliff$ cd addons/ofxKinect/ CliffMac:ofxKinect cliff$ git branch

cliff76 commented 13 years ago

It doesn't look like I have 007 checked out from openframeworks. Forgive me but I am very unexperienced with git. How do I pull or clone the 007 branch?

danomatika commented 13 years ago

It's a tag, the same as with OF:

git clone git://github.com/ofTheo/ofxKinect.git
cd ofxKinect
git checkout 007

Something weird must be going on on your system. Did you completely remove ofxKinect before cloning it again? aka:

cd addons
rm -rf ofxKinect

Also, the example project files have been renamed to "ofxKinectExample". Make sure you're not running one of the old projects ...

uranpro commented 13 years ago

I have same issue.

danomatika commented 13 years ago

Ok, I see it's a bad path in the Project.xconfig. I just updated, try the master branch.

cliff76 commented 13 years ago

yup just removed and re-checkedout everything from scratch and I get: In file included from /Users/cliff/dev/Kinect/openFrameworks/addons/ofxKinect/example/../../../addons/ofxKinect/src/ofxKinect.h:14, from /Users/cliff/dev/Kinect/openFrameworks/addons/ofxKinect/example/../../../addons/ofxKinect/src/ofxKinect.cpp:1: /Users/cliff/dev/Kinect/openFrameworks/addons/ofxKinect/example/../../../addons/ofxKinect/libs/libfreenect/libfreenect.h:175:33: error: libusb-1.0/libusb.h: No such file or directory

cliff76 commented 13 years ago

Sorry, that was after checking out the 007 tag in both openFrameworks and ofxKinect.

danomatika commented 13 years ago

RIght but the fix is in the master branch, do not checkout the 007 tag. If the fix works, I'll move the tag.

cliff76 commented 13 years ago

I just removed then checked out ofxKinect clean and I still get

/Users/cliff/dev/Kinect/openFrameworks/addons/ofxKinect/example/../../../addons/ofxKinect/libs/libfreenect/libfreenect.h:175:33: error: libusb-1.0/libusb.h: No such file or directory

uranpro commented 13 years ago

change OFX_KINECT_HEADERS = "$(ADDONS_PATH)/ofxKinect/libs/libusb/osx/include/"

uranpro commented 13 years ago

in Project.xcconfig

danomatika commented 13 years ago

Yes, this is what I've done in the master branch. Please checkout master and test ...

uranpro commented 13 years ago

=) no, your path is $(ADDONS_PATH)/ofxKinect/libs/limbs/include/ change to $(ADDONS_PATH)/ofxKinect/libs/libusb/osx/include/

danomatika commented 13 years ago

ah ok, woops. Thanks for the pull request. I wonder why it dosen't fail on my machine ...

uranpro commented 13 years ago

maybe that happens because you have global installed libusb?

danomatika commented 13 years ago

Yes that's it exactly. I forgot I had it installed by Homebrew .. no I get the errors without it.

danomatika commented 13 years ago

Ok all good. Thanks for finding that.