0

I am used to Java. I am learning more about C++ so I can learn how to add native capabilities into a Java program. With this being said, I am looking into how to use Kinect sensor with Java. I would like to use the OpenKinect project.

I am following the steps at : OpenKinect Getting Started site. I followed every step without any big issue and I go all through the steps up to compiling the source in Visual Studio 10. Here is a picture of my Cmake-GUI: Image of my Cmake

Cmake generates no problem. It is just the build in Visual Studio that gets me.

When I build the project I get a ton of warnings and it fails to build.

Do I need to follow the build process if I plan on using the source files in Java?

If so, I have not found anyone with the same errors I have been getting. There is a link off the readme that describes some common errors but states it will still build.

I didn't post the warnings because there are over 2000 lines.

Has anyone actually successfully done this?

itgeek25
  • 203
  • 2
  • 7
  • 18
  • Add to your post at least some of the warnings. And error message, which describes reason why build is *failed*. – Tsyvarev Sep 17 '15 at 20:54

1 Answers1

0

So hopefully this could help others....After going line by line through the error log I found the root of all the issues. It was just one method that was being accessed a little wrong. Just needed an adjustment.

To find I just compiled each instead of the whole solution and ignored warnings...just looked for errors.

In core.c:

    FREENECTAPI void freenect_select_subdevices(freenect_context *ctx, freenect_device_flags subdevs) {
ctx->enabled_subdevices = subdevs & (freenect_device_flags)(FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA
#ifdef BUILD_AUDIO
        | FREENECT_DEVICE_AUDIO
#endif
        );
}

Needs to be

    FREENECTAPI void freenect_select_subdevices(freenect_context *ctx, freenect_device_flags subdevs) {
ctx->enabled_subdevices = (freenect_device_flags)(subdevs & (FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA
#ifdef BUILD_AUDIO
        | FREENECT_DEVICE_AUDIO
#endif
        ));
}
itgeek25
  • 203
  • 2
  • 7
  • 18