Qt crashes when I try to use OpenNI2 library

203 views Asked by At

I'm trying to use the OpenNI library in a Qt C++ application. When I call anything from the OpenNI library and compile and run I get "The program has unexpectedly finished." instantly.. No error messages no nothing..

What I know:

  • It's the OpenNI library that causes this.
  • The include path and lib path in the .PRO file are set correctly.
  • I'm also using OpenCV and NiTE which I can access as expected.

Thank you in advance for the help :)

UPDATE:

I solved the problem, it wasn't directly related with the openNI library. I had the environment variables pointing to the 64bit library when I was building my application with a 32bit compiler.

Thank you for the help.

1

There are 1 answers

1
Thinh Phan On

Maybe OpenNI can not open device.

Try to copy folder OpenNI2 from C:\Program Files (x86)\OpenNI2\Redist and paste it to your release/debug folder.