Merge pull request #34 from MattiaMontanari/33-error-using-mex-matlab-under-linux
Build mex on linuxfixes-turtlebasket
commit
7a018a3c60
|
@ -38,11 +38,11 @@ end
|
|||
% TRY COMPILING MEX FILE
|
||||
fprintf('Compiling mex function... ')
|
||||
try
|
||||
mex(fullfile('..','..','src','openGJK.c'),... % Source of openGJK
|
||||
mex(fullfile('..','..','openGJK.c'),... % Source of openGJK
|
||||
'-largeArrayDims', ... % Support large arrays
|
||||
optflug, ... % Compiler flag for debug/optimisation
|
||||
fullfile('-I..','..','include'),... % Folder to header files
|
||||
'-outdir', pwd,... % Ouput directory for writing mex function
|
||||
fullfile('-I','..','..','include'),... % Folder to header files
|
||||
'-outdir', pwd, ... % Ouput directory for writing mex function
|
||||
'-output', 'openGJK',... % Name of ouput mex file
|
||||
'-DMATLAB_MEX_BUILD',... % Define variable for mex function in source files
|
||||
silflag ) % Silent/verbose flag
|
||||
|
|
|
@ -730,7 +730,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
|
|||
nCoordsB = mxGetN(prhs[1]);
|
||||
|
||||
/* Create output */
|
||||
plhs[0] = mxCreategkFloatMatrix(1, 1, mxREAL);
|
||||
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
|
||||
|
||||
/* get a pointer to the real data in the output matrix */
|
||||
distance = mxGetPr(plhs[0]);
|
||||
|
@ -763,7 +763,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
|
|||
s.nvrtx = 0;
|
||||
|
||||
/* Compute squared distance using GJK algorithm */
|
||||
distance[0] = gjk(bd1, bd2, &s);
|
||||
distance[0] = compute_minimum_distance(bd1, bd2, &s);
|
||||
|
||||
mxFree(arr1);
|
||||
mxFree(arr2);
|
||||
|
|
Loading…
Reference in New Issue