I just downloaded OpenNI 2 SDK (www.openni.org) and I am trying to setup a project in Visual Studio 2012. What I did:
- Create a new C++ Win32 Console Application Project
- Go to Project>MyProject Properties and, in Configuration Properties>VC++ Directories...
- Added C:\Program Files (x86)\OpenNI2\Redist\; to Executable Directories
- Added C:\Program Files (x86)\OpenNI2\Include\; to Include Directories
- Added C:\Program Files (x86)\OpenNI2\Redist\; to Reference Directories
- Added C:\Program Files (x86)\OpenNI2\Lib\; to Library Directories
But when I try to build I have the following unresolved symbol error (where ConsoleApplication1 is my project's name)
Error 1 error LNK2019: unresolved external symbol
__imp__oniInitialize referenced in function
"public: static enum openni::Status __cdecl openni::OpenNI::initialize(void)"
(?initialize@OpenNI@openni@@SA?AW4Status@2@XZ)
c:\Users\MyPC\documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.obj
ConsoleApplication1
I know this linking error is saying that the linker can't find some libraries but I thought what I just did was enough.
I also tried the 64 bit version, creating a 64 bit project, but I have the same errors.
I couldn't find satisfying documentation on this topic.
I'm sure I'm missing something silly. Can you please give some advice on this?