gmake *** Error 2 simulink code gen problems

2 views (last 30 days)
Russell
Russell on 12 Feb 2014
I have a simulink model with a matlab function component using codegen. I am getting a syntax error call and a gmak Error 2 error (full error below). I have setup my compiler and the code builds. I can also run other matlab functions fine. I have also run the code gen checker and it tells me my code is ready to be generated.
I am running OSX10.9.1 and matlab 2013b. I have already done the 10.8 mex work around.
The errors don't make any sense to me and I can't find any examples of folks getting the same errors. Maybe it is something silly. I have no ideas. I have made sure that I can compile other matlab function blocks. I have also run the code as a stand alone m file and it works fine (with some minor modification to obviously). I have also taken the matlab function and isolated in it's own simulink file to make sure it is the problem. It is.
Here is the error: Making simulation target "untitled_sfun", ...
/Applications/MATLAB_R2013b.app/bin/mex -c -O -DMATLAB_MEX_FILE -I/Applications/MATLAB_R2013b.app/extern/include -I/Applications/MATLAB_R2013b.app/simulink/include -I/Applications/MATLAB_R2013b.app/rtw/c/src -I/Applications/MATLAB_R2013b.app/stateflow/c/mex/include -I/Applications/MATLAB_R2013b.app/stateflow/c/debugger/include -I/Applications/MATLAB_R2013b.app/toolbox/stateflow/src/sf_runtime/export/include/sf_runtime untitled_sfun.c /Applications/MATLAB_R2013b.app/bin/mex -c -O -DMATLAB_MEX_FILE -I/Applications/MATLAB_R2013b.app/extern/include -I/Applications/MATLAB_R2013b.app/simulink/include -I/Applications/MATLAB_R2013b.app/rtw/c/src -I/Applications/MATLAB_R2013b.app/stateflow/c/mex/include -I/Applications/MATLAB_R2013b.app/stateflow/c/debugger/include -I/Applications/MATLAB_R2013b.app/toolbox/stateflow/src/sf_runtime/export/include/sf_runtime untitled_sfun_registry.c
/Applications/MATLAB_R2013b.app/bin/mex -silent LDFLAGS="\$LDFLAGS " -output untitled_sfun.mexmaci64 untitled_sfun.o untitled_sfun_registry.o /Users/russellmuren/Google\ Drive/(02)\ SunChill/Technical\ SunChill/SunChill\ CTM/slprj/_sfprj/untitled/ReboundLib/sfun/src/ReboundLib_sfun.a /Applications/MATLAB_R2013b.app/stateflow/c/mex/lib/maci64/sfc_mex.a /Applications/MATLAB_R2013b.app/stateflow/c/debugger/lib/maci64/sfc_debug.a -L/Applications/MATLAB_R2013b.app/bin/maci64 -lfixedpoint -L/Applications/MATLAB_R2013b.app/bin/maci64 -lut -L/Applications/MATLAB_R2013b.app/bin/maci64 -lemlrt -L/Applications/MATLAB_R2013b.app/bin/maci64 -lmwmathutil -L/Applications/MATLAB_R2013b.app/bin/maci64 -lmwblas -L/Applications/MATLAB_R2013b.app/bin/maci64 -lippmwipt /bin/sh: -c: line 0: syntax error near unexpected token `(' /bin/sh: -c: line 0: `/Applications/MATLAB_R2013b.app/bin/mex -silent LDFLAGS="\$LDFLAGS " -output untitled_sfun.mexmaci64 untitled_sfun.o untitled_sfun_registry.o /Users/russellmuren/Google\ Drive/(02)\ SunChill/Technical\ SunChill/SunChill\ CTM/slprj/_sfprj/untitled/ReboundLib/sfun/src/ReboundLib_sfun.a /Applications/MATLAB_R2013b.app/stateflow/c/mex/lib/maci64/sfc_mex.a /Applications/MATLAB_R2013b.app/stateflow/c/debugger/lib/maci64/sfc_debug.a -L/Applications/MATLAB_R2013b.app/bin/maci64 -lfixedpoint -L/Applications/MATLAB_R2013b.app/bin/maci64 -lut -L/Applications/MATLAB_R2013b.app/bin/maci64 -lemlrt -L/Applications/MATLAB_R2013b.app/bin/maci64 -lmwmathutil -L/Applications/MATLAB_R2013b.app/bin/maci64 -lmwblas -L/Applications/MATLAB_R2013b.app/bin/maci64 -lippmwipt ' gmake: * [untitled_sfun.mexmaci64] Error 2
Any advise would be really helpful.

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!