This is my first attempt to compile a main.cpp file with cygwin. The command I am using in cygwin is:
$ g++ main.cpp -o main
I am getting a series of errors like this:
main.cpp:26:22: error: XnOpenNI.h: No such file or directory
main.cpp:29:31: error: XnVSessionManager.h: No such file or directory
main.cpp:30:39: error: XnVMultiProcessFlowClient.h: No such file or directory
main.cpp:31:29: error: XnVWaveDetector.h: No such file or directory
In file included from main.cpp:33:
kbhit.h:4:24: error: XnPlatform.h: No such file or directory
My main.cpp looks like this
// General headers
#include <stdio.h>
// OpenNI headers
#include <XnOpenNI.h>
using namespace std;
// NITE headers
#include <XnVSessionManager.h>
#include "XnVMultiProcessFlowClient.h"
#include <XnVWaveDetector.h>
Even thought I have these .h files in the same directory as main.cpp I do believe that the error is due to the fact that I need to somehow define a path.
Any suggestions?
Thanks
put them in quotes “” rather than <> if they are local, they are assumed to be in the system paths otherwise, alternatively
g++ main.cpp -o main -I *local_path*
where *local_path* is your current directory