Hey everybody! I'm trying to convert a time-costly loop I have into a MEX file that I can call from the rest of my MATLAB function, but I'm having trouble compiling it.
I get the following printouts when trying to compile it:
------------------------------------------------------------------------gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "run_trials_data.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "run_trials_initialize.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "run_trials_terminate.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "run_trials.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "normrnd.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "indexShapeCheck.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "interface/_coder_run_trials_info.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "interface/_coder_run_trials_api.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "interface/_coder_run_trials_mex.c"gcc -c -fexceptions -fno-omit-frame-pointer -DTARGET_API_VERSION=700 -m64 -DMATLAB_MEX_FILE -DMATLAB_MEX_FILE -g -I "D:\Program Files\MATLAB\R2017a/simulink/include" -I "D:\Program Files\MATLAB\R2017a/toolbox/shared/simtargets" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base\codegen\mex\run_trials" -I "D:\Users\Andrew\Google Drive\UCSB\Computational Cognitive Neuroscience Research\Development Code Base" -I ".\interface" -I "D:\Program Files\MATLAB\R2017a\extern\include" -I "." "run_trials_emxutil.c"gmake: *** No rule to make target `c_mexapi_version.o', needed by `run_trials_mex.mexw64'. Stop.------------------------------------------------------------------------
I used the Matlab Coder application to automatically generate a build script, which invokes the following command that causes this error:
%%Invoke MATLAB Coder.
codegen -config cfg run_trials -args ARGS{1}
I'd appreciate pointers as to how to fix this make issue. Thanks!
Best Answer