I am trying to work with @bakercp 's fork of ofxKinectV2 on windows VS2017 (https://github.com/bakercp/ofxKinectV2). I have read through many other threads regarding this, mostly for theodore watsons ofxKinectV2. I could get the original repo functioning but want to take advantage of the later version of libfreenect and the point cloud (which I could never get working myself) . I have taken the following steps and think I am getting close.
I have downloaded the release lib of libfreenect2 from git (https://github.com/OpenKinect/libfreenect2/releases)
and added the lib to my project in
properties->linker->input->additional dependancies
and added the path to the lib in
properties->linker->general->additional library directories
I installed the nvidia gpu computing toolkit and added OpenCL.lib to
properties->linker->input->additional dependancies
and added the path to the lib in
properties->linker->general->additional library directories
and added the opencl (and cuda) include folder to
properties->C/C++->General->additional include directories
The example compiles but I get linker errors I don’t understand (only 2).
Error unresolved external symbol "public: __cdecl libfreenect2::OpenCLKdePacketPipeline::OpenCLKdePacketPipeline(int)" (??0OpenCLKdePacketPipeline@libfreenect2@@QEAA@H@Z) example C:\Users\Fred\Documents\openFrameworks\addons\ofxKinectV2\example C:\Users\Fred\Documents\openFrameworks\addons\ofxKinectV2\example\ofProtonect.obj 1
and
Error unresolved external symbol "public: __cdecl libfreenect2::OpenCLPacketPipeline::OpenCLPacketPipeline(int)" (??0OpenCLPacketPipeline@libfreenect2@@QEAA@H@Z) example C:\Users\Fred\Documents\openFrameworks\addons\ofxKinectV2\example C:\Users\Fred\Documents\openFrameworks\addons\ofxKinectV2\example\ofProtonect.obj 1
Ideally I would like to use CUDA instead of openCL for its performance advantage, but openCL would be fine if I can get it to compile.
I have a further question related to CUDA. I see in the config.h file a lot of defines that switch the image decoding and hardware acceleration methods. I don’t really get the structure or how I should change them. I thought I should just use a pre-processor definition in the project properties but this gives redefinition warnings and I am not sure if this is how it should work.
For example, I have added the cuda.lib and include paths and added a pre-processor definition in
properties->C/C++->Preprocessor->preprocessor definitions LIBFREENECT2_WITH_CUDA_SUPPORT
and in
properties->C/C++->Preprocessor->undefine preprocessor definitions LIBFREENECT2_WITH_OPENCL_SUPPORT;LIBFREENECT2_WITH_OPENGL_SUPPORT
When I do this it seems correct but then I get the following errors:
'CUDAKDEPacketPipeline': is not a member of 'libfreenect2'
'CUDAPacketPipeline': is not a member of 'libfreenect2'
syntax error: identifier 'CUDAKDEPacketPipeline'
syntax error: identifier 'CUDAPacketPipeline'
It would be great to get an understanding of how I can solve this.
Cheers
Fred