Error compiling ofxKinect with ofxSquashBuddies



I’m trying to add ofxKinect to one of the examples (exampleLoopback) to use the kinect instead of a webcam.

I managed to compile the example in both release and debug configurations but when I add ofxKinect the project will only compile in debug. Trying to compile in release triggers this error:

Error C1047 The object or library file '..\..\..\addons\ofxKinect\libs\libusb\lib\vs\x64\libusb-1.0.lib' was created with an older compiler than other objects; rebuild old objects and libraries

I’ve managed to compile other projects using ofxKinect in release mode without problems, the problem comes when trying to use these two addons together.

I’ve opened an issue with more details here:

I can also share project files.

Has anyone encountered this problem before? Maybe the property sheets that ofxSquashBuddies requires are changing the way libraries are linked? If @elliotwoods or someone else can shed some light on this issue it would be greatly appreciated.



hmm interesting, i saw this issue recently on another project (ofxGui contained an old library so wouldn’t build in release, but would in Debug or vice versa)
i think it might be a problem with the actual openframeworks release itself.

that said, ofxSquash is built for oF 0.9.x / VS2015
I haven’t updated that one either.

Which oF / VS version are you using?
can you use VS2015? (i wouldn’t recommend trying to build squash unless you’re good at that type of thing)


in theory v141 (VS2017) works with v140 (VS2015) builds, but there’s sometimes som issues like you have here


Hi Elliot, thanks for your answers.

I’m using VS2017 with oF0.10.0. After some minor fixes to the src I managed to compile ofxSquashLib in VS2017 and all examples work as expected. Same with ofxSquashBuddies. So the problem seemed to be the pre-compilled libusb-1.0.lib.

As a quick fix, I’ve recompiled libusb for VS2017 (release x64) and have used that instead of the one shipped with oF. Now the project compiles and so far everything is working fine. Yay!

Yes, and I think is very related to this other problem:

I had to manually recompile libusb for release x64 and the Aphotrecary formula doesn’t seem to account for debug/release configurations… Shouldn’t the library be compiled for both debug and release? I guess this is a question for @arturo.