codegen mex cannot find api.h

조회 수: 1 (최근 30일)
Andrew
Andrew 2014년 6월 10일
답변: Andrew 2014년 6월 17일
Hello everyone.
I am trying to use the codegen function to convert a large section of code into c. The codegen successfully creates the c files but when the mexer tries to take over I get the following error:
gui_run_mexutil.c:12:10: fatal error: '_coder_gui_run_api.h' file not found
where gui_run is the function that I am trying to convert to c and then mex. I run the coding with the codegen command: codegen gui_run -args {hand} -o gui_runc -v
Does anyone know what is going on?
Thanks!
Andrew
P.S. obviously the _coder_gui_run_api.h is either not where the compiler expects it to be or was not created. This is what I need to figure out.
Also, The _coder_gui_run_api is located in the folder with all of the other c and h files so it does exist.

채택된 답변

Andrew
Andrew 2014년 6월 17일
For those who may have a similar problem: The issue was that the path I was trying to compile the code in had spaces in some of the directories. Apparently no one has figured out how to work around this for Mac at Matlab so if you're trying to use codegen/mex with a Mac make sure you don't use a path with spaces in the path name...

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by