Matlab Coder - gmake: *** [FIR_Filter.lib] Error 2

2 visualizzazioni (ultimi 30 giorni)
Sean
Sean il 29 Ott 2013
Commentato: Sean il 30 Ott 2013
When I use Matlab Coder on my file FIR_Filter.m it throws the above error. Please help me to make it go away.
Background: I want to convert my file to C code because I am going to fold the C code into an already functioning C program on my embedded linux system. If this is successful, I will use Coder to convert other Matlab files.
Things I have successfully tried: 1. Using Coder to build a mex file from FIR_Filter. I used 'verification' to make sure it runs from the calling matlab m-file. 2. Verified cmd.exe is located in C:\windows\system32 and added that directory to the Matlab path. 3. Using Coder to build a 'c/c++ static library' with the 'Generate Code Only' box checked
Now, I know I could have stopped at step#3. But I really want to see the compile work if I ever need to run this as an independent application on my desktop PC.
I am using the built in compiler Lcc-win32 C 2.4.1 in C:\PROGRA~2\MATLAB\R2013a\sys\lcc
Full Build.log text: 1 "### Compiling "FIR_Filter_data.c" ..." 2 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"FIR_Filter_data.obj" "FIR_Filter_data.c" 3 "### Compiling "FIR_Filter_initialize.c" ..." 4 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"FIR_Filter_initialize.obj" "FIR_Filter_initialize.c" 5 "### Compiling "FIR_Filter_terminate.c" ..." 6 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"FIR_Filter_terminate.obj" "FIR_Filter_terminate.c" 7 "### Compiling "FIR_Filter.c" ..." 8 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"FIR_Filter.obj" "FIR_Filter.c" 9 "### Compiling "filter.c" ..." 10 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"filter.obj" "filter.c" 11 "### Compiling "FIR_Filter_emxutil.c" ..." 12 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"FIR_Filter_emxutil.obj" "FIR_Filter_emxutil.c" 13 "### Compiling "FIR_Filter_emxAPI.c" ..." 14 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"FIR_Filter_emxAPI.obj" "FIR_Filter_emxAPI.c" 15 "### Compiling "rt_nonfinite.c" ..." 16 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"rt_nonfinite.obj" "rt_nonfinite.c" 17 Warning rt_nonfinite.c: 33 Statement has no effect 18 0 errors, 1 warnings 19 "### Compiling "rtGetNaN.c" ..." 20 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"rtGetNaN.obj" "rtGetNaN.c" 21 "### Compiling "rtGetInf.c" ..." 22 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcc -c -noregistrylookup -IC:/PROGRA~2/MATLAB/R2013a/sys/lcc/include -DMODEL=FIR_Filter -DHAVESTDIO -DUSE_RTMODEL -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y -IX:/ICEX/ICEX14/Tracking/DC1J40~8/D2REZO~Y/D96L45~N.0/Software/Matlab/RCJ1FA~Y/codegen/lib/FXOBEE~H -IC:/PROGRA~2/MATLAB/R2013a/extern/include -IC:/PROGRA~2/MATLAB/R2013a/simulink/include -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/src/ext_mode/common -IC:/PROGRA~2/MATLAB/R2013a/rtw/c/ert -Fo"rtGetInf.obj" "rtGetInf.c" 23 "### Creating command file: FIR_Filter.lnk" 24 C:/PROGRA~2/MATLAB/R2013a/sys/perl/win32/bin/perl.exe C:/PROGRA~2/MATLAB/R2013a/rtw/c/tools/mkvc_lnk.pl FIR_Filter.lnk FIR_Filter_data.obj FIR_Filter_initialize.obj FIR_Filter_terminate.obj FIR_Filter.obj filter.obj FIR_Filter_emxutil.obj FIR_Filter_emxAPI.obj rt_nonfinite.obj rtGetNaN.obj rtGetInf.obj 25 "### Created: FIR_Filter.lnk" 26 "### Creating static library "./FIR_Filter.lib" ..." 27 C:/PROGRA~2/MATLAB/R2013a/sys/lcc/bin/lcclib /out:./FIR_Filter.lib @FIR_Filter.lnk 28 "### Created: ./FIR_Filter.lib" 29 "### Deleting command file: FIR_Filter.lnk" 30 process_begin: CreateProcess(NULL, rm -f FIR_Filter.lnk, ...) failed. 31 make (e=2): The system cannot find the file specified. 32 gmake: * [FIR_Filter.lib] Error 2 33 The make command returned an error of 2 34 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, 35 operable program or batch file. 36 37 ### Failed to generate all binary outputs.
  3 Commenti
Sean
Sean il 30 Ott 2013
When I click the Build button, 'Generate code only' is unchecked and Output Type is 'C/C++ Static Library'.
Sean
Sean il 30 Ott 2013
I just tried compiling with MSVC 2012.
I put the entire MSVC 11.0 directory structure in the Matlab path.
Now I get a more severe error. Matlab can't even find the cl.exe tools???
1 Validation error(s):
2 ### Validating other build tools ...
3
4 Unable to locate build tool "Microsoft Visual C Compiler": cl
5 Unable to locate build tool "Microsoft Visual C++ Compiler": cl
6 Unable to locate build tool "Microsoft Visual C/C++ Archiver": lib
7 Unable to locate build tool "Microsoft Visual C/C++ Linker": link
8 Unable to locate build tool "NMAKE Utility": nmake

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by