Make error in Simlink

조회 수: 3 (최근 30일)
Tan Edwin
Tan Edwin 2011년 3월 16일
Hi all
i am currently using constants block as input parameters for my simulink model, but i need to convert them into a m-file instead of constants blocks. It aws working alright when using the constant blocks but i received a Make Error when i converted them into Embedded MATLAB Fcn/MATLAB Fcn blocks. Anyone noes whats the problem?
Making simulation target "Dose_Noyield_m_file_Modeling_sfun", ...
C:\...\_self\sfun\src>"c:\program files\matlab\r2010b\sys\lcc\bin\lccmake" -f Dose_Noyield_m_file_Modeling_sfun.lmk Warning c1_Dose_Noyield_m_file_Modeling.c: 268 static `pointer to const incomplete struct mxArray_tag defined at c:\program files\matlab\r2010b\extern\include\matrix.h 298 function(pointer to void,pointer to void) c1_b_sf_marshall' is not referenced 0 errors, 1 warnings Warning c2_Dose_Noyield_m_file_Modeling.c: 274 static `pointer to const incomplete struct mxArray_tag defined at c:\program files\matlab\r2010b\extern\include\matrix.h 298 function(pointer to void,pointer to void) c2_b_sf_marshall' is not referenced 0 errors, 1 warnings Warning c3_Dose_Noyield_m_file_Modeling.c: 317 static `pointer to const incomplete struct mxArray_tag defined at c:\program files\matlab\r2010b\extern\include\matrix.h 298 function(pointer to void,pointer to void) c3_c_sf_marshall' is not referenced 0 errors, 1 warnings Writing library for Dose_Noyield_m_file_Modeling_sfun.mexw32 "c:\program files\matlab\r2010b\sys\lcc\bin\lcc.exe" -c -Zp8 -DMATLAB_MEX_FILE -noregistrylookup -I"c:\program files\matlab\r2010b\sys\lcc\include" -I"c:\program files\matlab\r2010b\extern\include" -I"c:\program files\matlab\r2010b\simulink\include" -I"c:\program files\matlab\r2010b\stateflow\c\mex\include" -I"c:\program files\matlab\r2010b\stateflow\c\debugger\include" "Dose_Noyield_m_file_Modeling_sfun.c" "c:\program files\matlab\r2010b\sys\lcc\bin\lcc.exe" -c -Zp8 -DMATLAB_MEX_FILE -noregistrylookup -I"c:\program files\matlab\r2010b\sys\lcc\include" -I"c:\program files\matlab\r2010b\extern\include" -I"c:\program files\matlab\r2010b\simulink\include" -I"c:\program files\matlab\r2010b\stateflow\c\mex\include" -I"c:\program files\matlab\r2010b\stateflow\c\debugger\include" "Dose_Noyield_m_file_Modeling_sfun_registry.c" "c:\program files\matlab\r2010b\sys\lcc\bin\lcc.exe" -c -Zp8 -DMATLAB_MEX_FILE -noregistrylookup -I"c:\program files\matlab\r2010b\sys\lcc\include" -I"c:\program files\matlab\r2010b\extern\include" -I"c:\program files\matlab\r2010b\simulink\include" -I"c:\program files\matlab\r2010b\stateflow\c\mex\include" -I"c:\program files\matlab\r2010b\stateflow\c\debugger\include" "c1_Dose_Noyield_m_file_Modeling.c" "c:\program files\matlab\r2010b\sys\lcc\bin\lcc.exe" -c -Zp8 -DMATLAB_MEX_FILE -noregistrylookup -I"c:\program files\matlab\r2010b\sys\lcc\include" -I"c:\program files\matlab\r2010b\extern\include" -I"c:\program files\matlab\r2010b\simulink\include" -I"c:\program files\matlab\r2010b\stateflow\c\mex\include" -I"c:\program files\matlab\r2010b\stateflow\c\debugger\include" "c2_Dose_Noyield_m_file_Modeling.c" "c:\program files\matlab\r2010b\sys\lcc\bin\lcc.exe" -c -Zp8 -DMATLAB_MEX_FILE -noregistrylookup -I"c:\program files\matlab\r2010b\sys\lcc\include" -I"c:\program files\matlab\r2010b\extern\include" -I"c:\program files\matlab\r2010b\simulink\include" -I"c:\program files\matlab\r2010b\stateflow\c\mex\include" -I"c:\program files\matlab\r2010b\stateflow\c\debugger\include" "c3_Dose_Noyield_m_file_Modeling.c" "c:\program files\matlab\r2010b\sys\lcc\bin\lcc.exe" -c -Zp8 -DMATLAB_MEX_FILE -noregistrylookup -I"c:\program files\matlab\r2010b\sys\lcc\include" -I"c:\program files\matlab\r2010b\extern\include" -I"c:\program files\matlab\r2010b\simulink\include" -I"c:\program files\matlab\r2010b\stateflow\c\mex\include" -I"c:\program files\matlab\r2010b\stateflow\c\debugger\include" "c:\program files\matlab\r2010b\sys\lcc\mex\lccstub.c" "c:\program files\matlab\r2010b\sys\lcc\bin\lcclnk.exe" -s -dll -L"c:\program files\matlab\r2010b\sys\lcc\lib" -o Dose_Noyield_m_file_Modeling_sfun.mexw32 @Dose_Noyield_m_file_Modeling_sfun.lmko Time: 6.328 seconds
Make successful for machine: "Dose_Noyield_m_file_Modeling"
moving Dose_Noyield_m_file_Modeling_sfun.mexw32 from C:...\slprj\_sfprj\Dose_Noyield_m_file_Modeling\_self\sfun\src to C:\...\Testing simulations failed.
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2011년 3월 16일
What is the code you wrote in the Embedded MATLAB block? Also, what are you building the model for? S-function target? Accelerator mode?

댓글을 달려면 로그인하십시오.

답변 (1개)

MarkB
MarkB 2011년 3월 21일
Actually, the third line from the end seems to indicate that "make" actually succeeded:
Make successful for machine: "Dose_Noyield_m_file_Modeling"
The real error seems to be related to an issue copying/moving the ".mexw32" file. The root cause isn't really clear, but I would check the following things:
  • The destination directory exists in the first place.
  • You have write permissions to that directory.
  • There isn't already a file with the same name at that location that you are unable to delete/overwrite. For example, it may be that this file is still in use by another model)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by