Not able to include files to my .cpp file

1 view (last 30 days)
Hello
Can some one please help me with this ?
I am trying to include .h files from "/Users/akshayiyangar/Desktop/kinect_home/OpenNI/Include" to my .cpp file
i tried using this command
mex -L"/Users/akshayiyangar/Desktop/kinect_home/OpenNI/Include/" mxNiChangeDepthViewPoint.cpp
but i am getting this error.
Error using mex
/Users/akshayiyangar/Documents/MATLAB/Kinect_Matlab_version2/OpenNI1/Mex/mxNiChangeDepthViewPoint.cpp:3:10:
fatal error: 'XnOpenNI.h' file not found
#include <XnOpenNI.h>
^
1 error generated.

Accepted Answer

Walter Roberson
Walter Roberson on 1 May 2016
mex -I"/Users/akshayiyangar/Desktop/kinect_home/OpenNI/Include/" mxNiChangeDepthViewPoint.cpp
Use -I to give the directory for Include files. Use -L to give the directory for Libraries
  1 Comment
Akshay Iyangar
Akshay Iyangar on 1 May 2016
Issue resolved there was an issue with the toolbox changed some code got it working.Thanks.

Sign in to comment.

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!