Pergunta

I made a CMake project for using OpenNI2 and NITE2 following the usual steps. CMake is able to find the paths for includes and libs of both NITE and OpenNI. The project in visual studio links the libs and includes properly.

So far everything looks right, but when I compile (no linking errors) I get weird sintax error with the file OnyCTypes.h. Errors are like:

Error1 error C2146: syntax error : missing ';' before identifier 'usbVendorId'  c:\program files (x86)\openni2\include\OniCTypes.h  84

I also copied the folder Openni/Redist contents to the same folder of the Visual Studio project, so I cannot guess what is causing the error.

What else can I check? Anybody had a similar error with OpenNI2?

Foi útil?

Solução

uint16_t belong to stdint.h Take a Look

This library is not included in VS2008 by default, download it and include it in the CMake to run the project without the linking problem.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top