Mex Compile failed, MATLAB 2013b
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi,
I installed MATLAB 2013b on my Mac and when i try to run a simple simulink simulation, it fails. The versions installed on my computer are MATLAB 2013b, Mavericks OS X 10.9, GCC 4.2.1, Xcode 5.0.2
Do i need to install anything else?
The following is the error that i get when i run the simple simulation
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 Test1_sfun.c /Users/muhammadsaleem/.matlab/R2013b/mexopts.sh: line 1: musal176#: command not found /Users/muhammadsaleem/.matlab/R2013b/mexopts.sh: line 176: unexpected EOF while looking for matching `'' /Users/muhammadsaleem/.matlab/R2013b/mexopts.sh: line 205: syntax error: unexpected end of file /Users/muhammadsaleem/.matlab/R2013b/mexopts.sh: line 1: musal176#: command not found /Users/muhammadsaleem/.matlab/R2013b/mexopts.sh: line 176: unexpected EOF while looking for matching `'' /Users/muhammadsaleem/.matlab/R2013b/mexopts.sh: line 205: syntax error: unexpected end of file /Applications/MATLAB_R2013b.app/bin/mexsh: line 1341: -c: command not found
mex: compile of ' "Test1_sfun.c"' failed.
gmake: * [Test1_sfun.o] Error 255
How do i fix this? Your help will be very appreciated. :o)
Best regards, saleem
댓글 수: 5
Deepesh B
2014년 10월 19일
### Generating code into build folder: C:\Users\Deepesh\Desktop\test_zynq\test_2\gm_test_2_zynq_interface_ert_rtw
### Invoking Target Language Compiler on gm_test_2_zynq_interface.rtw
### Using System Target File: C:\Program Files\MATLAB\R2014a\rtw\c\ert\ert.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file gm_test_2_zynq_interface.h
### Writing header file gm_test_2_zynq_interface_types.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing source file gm_test_2_zynq_interface.c
### Writing header file gm_test_2_zynq_interface_private.h
### Writing source file ert_main.c
### TLC code generation complete.
### Generating TLC interface API.
### Creating data type transition file gm_test_2_zynq_interface_dt.h
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: Xilinx ISE Design Suite v14.4 | gmake (64-bit Windows)
### 'C:\Users\Deepesh\Desktop\test_zynq\test_2\gm_test_2_zynq_interface_ert_rtw\gm_test_2_zynq_interface.mk' is up to date
### Building 'gm_test_2_zynq_interface': C:\PROGRA~1\MATLAB\R2014a\bin\win64\gmake -f gm_test_2_zynq_interface.mk all
C:/Xilinx/14.6/ISE_DS/EDK/gnu/arm/nt/bin/arm-xilinx-linux-gnueabi-gcc -c -O0 -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=neon -DMODEL=gm_test_2_zynq_interface -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DON_TARGET_WAIT_FOR_START=0 -DONESTEPFCN=1 -DEXT_MODE=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DARM_PROJECT -DRT -DSTACK_SIZE=64 -DONESTEPFCN=1 -DEXT_MODE=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=0 -DMODEL=gm_test_2_zynq_interface -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Deepesh/Desktop/test_zynq/test_2/gm_test_2_zynq_interface_ert_rtw -IC:/Users/Deepesh/Desktop/test_zynq/test_2 -IC:/PROGRA~1/MATLAB/R2014a/extern/include -IC:/PROGRA~1/MATLAB/R2014a/simulink/include -IC:/PROGRA~1/MATLAB/R2014a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2014a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2014a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2014a/toolbox/coder/rtiostream/src/utils -IC:/MATLAB/SupportPackages/R2014a/zynq/include -IC:/PROGRA~1/MATLAB/R2014a/toolbox/target/codertarget/rtos/inc -o "gm_test_2_zynq_interface.o" "gm_test_2_zynq_interface.c"
/usr/bin/sh: -c: line 3: syntax error: unexpected end of file
gmake: *** [gm_test_2_zynq_interface.o] Error 258
I also got this error
Michal
2014년 11월 21일
I've got a similar error during code generation for TI C2000 Launchpad using Matlab 2014a, a part of message from diagnostic viewer
. . . C:/ti/controlSUITE/device_support/f2802x/v129/DSP2802x_headers/include --output_file="MW_c28xx_board.obj" "MW_c28xx_board.c" /usr/bin/sh: -c: line 3: syntax error: unexpected end of file gmake: * [MW_c28xx_board.obj] Error 258
Can anyone help me?
답변 (1개)
Tyler
2014년 9월 13일
Check the mexopts.sh file in your MATLAB application's bin folder. Make sure the apostrophes match; mine were off on MAC_OSX_UPDATE line.
댓글 수: 1
Michal
2014년 11월 23일
I've Matlab 2013a and I can't find file mexopts.sh in my Matlab bin folder, are you sure that it is correct file name?
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Aerospace Blockset에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!