Make error in Simlink

3 views (last 30 days)
Tan Edwin
Tan Edwin on 16 Mar 2011
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 Comment
Kaustubha Govind
Kaustubha Govind on 16 Mar 2011
What is the code you wrote in the Embedded MATLAB block? Also, what are you building the model for? S-function target? Accelerator mode?

Sign in to comment.

Answers (1)

MarkB
MarkB on 21 Mar 2011
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)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!