This post has NOT been accepted by the mailing list yet.
I try to to bind the PCL in a Dynamic Link Library. Specially I want to use the Kinfu functionallity and wrap it.
I use Visual Studio 2012 (yes I got it to compile PCL for it), OpenNI2, Unicode and x64. I already started the Kinfu_App example appplication and it worked fine, without any problems (btw nice job!). For that I had to change some code in the App from OpenNI to OpenNI2.
But when I try to use the Kinfu functionality in my DLL i got really in trouble. So I don't get really far. First i try to link, include, bind everything from the Kinfu_app example. So got it more or less, had some problems at the beginning with the PCL_APIEXPORTS Makro but when I removed it, it started to compile.
But no I stuck really hard. Always Iam using OpenNI2, Visual Studio shows me some Memory Leaks after closing the MFC-Application (also when I just include some headers without any class initializations) which links to the Dll. Ignoring the Memory Leaks I try to call the OpenNI2_Grapper or DeviceManager. Always when they get Initialized I got some pcl::IOException. The exception just say that at some memory position was going something wrong. Not really helpfull. I have a bit the feeling that OpenNi2 can't find the driver for the Kinect.
My question is now if somebody has experience by using PCL/Kinfu/OpenNi2 in a Dynamic Link Library? Is it possible to us it in a DLL (think it should)? Or has somebody an idea where the error maybe come from?
Thanks for help if somthing is not clear please ask!
Re: Bind PCL, OpenNi2 in DLL using Visual Studio 2012
Would you mind sharing some details about how you got the kinfu_app to run with OpenNI2? I am interested in doing the same thing, but it isn't clear how to deal with the openni_wrapper. I am using something close to PCL version 1.8.0.