Need help in R2010b using the build_ada_sfcn command.

The mex -v -ada command executes correctly in version R2007a (.mexw32) and R2010b (.dll)
Tech Note 1821 - (Developing and Building S-Functions for Simulink® that Incorporate Ada Code) said the mex -v –ada command will not be supported past R2010b.
Tech Note 1821 says to use this command, build_ada_sfcn
But I get and error using build_ada_sfcn, can you tell me why??
This is the successful mex -v -ada PW_Build_20_1R.ads
>> mex -v -ada PW_Build_20_1R.ads Warning: The -ada option to mex is not recommended. Instead, use the method provided in Tech Note 1821, which includes a MATLAB function and interface files that provide the same capability.
gcc -ID:\APPS\MatLab-R2010B\extern\include -ID:\APPS\MatLab-R2010B\simulink\include -ID:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface -Wall -fexceptions -malign-double -DMATLAB_MEX_FILE -DMX_COMPAT_32 -DPCWIN -DS_FUNCTION_NAME=Ada_PW_Build_20_LSF1R_160HZ -DMDL_INITIALIZE_SIZES -DMDL_START -DMDL_OUTPUTS -v -c -o Ada_PW_Build_20_LSF1R_160HZ_obj_pcwin\sl_ada_entry.o D:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface\sl_ada_entry.c
> Reading specs from D:\APPS\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\specsgcc version 2.8.1 D:\APPS\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\cpp.exe -lang-c -v -ID:\APPS\MatLab-R2010B\extern\include -ID:\APPS\MatLab-R2010B\simulink\include -ID:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface -undef -D__GNUC__=2…….
gnatmake -c --GCC=gcc -aID:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface -v ../PW_Build_20_1R.adb -cargs -Wall -fexceptions -malign-double
> GNATMAKE 3.15p (20020523) Copyright 1995-2002 Free Software Foundation, Inc. "pw_build_20_1r.ali" being checked ... -> "pw_build_20_1r.ali" missing.gcc -c -I../ -ID:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface -Wall -fexceptions -malign-double -I- ../pw_build_20_1r.adb "chydsolrq.ali" being checked ... -> "chydsolrq.ali" missing.gcc -c -I../ -ID:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface -Wall -fexceptions -malign-double -I-……
gnatdll Ada_PW_Build_20_LSF1R_160HZ_obj_pcwin\PW_Build_20_1R.ali Ada_PW_Build_20_LSF1R_160HZ_obj_pcwin\sl_ada_entry.o -n -e D:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\ada_sfcn_interface\mex.def -d .\Ada_PW_Build_20_LSF1R_160HZ.dll -v -largs D:\APPS\MatLab-R2010B\extern\lib\win32\microsoft\libmx.lib D:\APPS\MatLab-R2010B\extern\lib\win32\microsoft\libmex.lib
> GNATDLL 3.15p (20020523) - Dynamic Libraries Builderusing D:\APPS\GNAT\bin\dlltool.exeusing D:\APPS\GNAT\bin\gcc.exeusing D:\APPS\GNAT\bin\gnatbind.exeusing D:\APPS\GNAT\bin\gnatlink.exeBuilding relocatable DLL...make .\Ada_PW_Build_20_LSF1R_160HZ.dllgnatbind –n……………..
Warning: In the directory "H:\Mathworks\simulink\PW_Build_20", Ada_PW_Build_20_LSF1R_160HZ.mexw32 now shadows Ada_PW_Build_20_LSF1R_160HZ.dll. Please see the MATLAB 7.1 Release Notes. > In D:\APPS\MatLab-R2010B\toolbox\simulink\simulink\private\build_ada_sfcn_using_gnat.p>build_ada_sfcn_using_gnat at 180 In sl at 16 In mex_helper at 29 In mex at 206 >>
This is the NOT successful build_ada_sfcn PW_Build_20_1R.ads -v
>> build_ada_sfcn PW_Build_20_1R.ads -v Warning: The fourth output, VERSN, of FILEPARTS will be removed in a future release. > In fileparts at 35 In build_ada_sfcn at 93 Warning: The fourth output, VERSN, of FILEPARTS will be removed in a future release. > In fileparts at 35 In build_ada_sfcn>clear_mex_file at 263 In build_ada_sfcn at 112 Executing 'gcc -ID:\APPS\MatLab-R2010B\extern\include -ID:\APPS\MatLab-R2010B\simulink\include -IH:\Mathworks\simulink\PW_Build_20\ada_sfcn_interface -Wall -fexceptions -malign-double -DMATLAB_MEX_FILE -DMX_COMPAT_32 -DPCWIN -DS_FUNCTION_NAME=Ada_PW_Build_20_LSF1R_160HZ -DMDL_INITIALIZE_SIZES -DMDL_START -DMDL_OUTPUTS -v -c -o Ada_PW_Build_20_LSF1R_160HZ_obj_pcwin\sl_ada_entry.o H:\Mathworks\simulink\PW_Build_20\ada_sfcn_interface\sl_ada_entry.c' ... ... Succeeded with no output. Executing 'gnatmake -c --GCC=gcc -aIH:\Mathworks\simulink\PW_Build_20\ada_sfcn_interface -v ../PW_Build_20_1R.adb -cargs -Wall -fexceptions -malign-double ' ... ??? Error using ==> build_ada_sfcn>run_cmd at 201 Error executing 'gnatmake -c --GCC=gcc -aIH:\Mathworks\simulink\PW_Build_20\ada_sfcn_interface -v ../PW_Build_20_1R.adb -cargs -Wall -fexceptions -malign-double '
GNATMAKE 3.15p (20020523) Copyright 1995-2002 Free Software Foundation, Inc. "pw_build_20_1r.ali" being checked ... -> "pw_build_20_1r.ali" missing. gcc -c -I../ -IH:\Mathworks\simulink\PW_Build_20\ada_sfcn_interface -Wall -fexceptions -malign-double -I- ../pw_build_20_1r.adb pw_build_20_1r.ads:1:06: file "simulink.ads" not found pw_build_20_1r.ads:1:06: "Pw_Build_20_1r (body)" depends on "Pw_Build_20_1r (spec)" pw_build_20_1r.ads:1:06: "Pw_Build_20_1r (spec)" depends on "Simulink (spec)" End of compilation gnatmake: "../pw_build_20_1r.adb" compilation error
Error in ==> build_ada_sfcn at 139 run_cmd(['gnatmake ', gnatmakeflags, '../', sfcnAdaBody, ...
>>

2 个评论

Kevin: Could you please contact MathWorks Tech Support about this issue?
Thanks for the advice, I submitted this question to Tech Support.

请先登录,再进行评论。

回答(0 个)

产品

Community Treasure Hunt

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

Start Hunting!

Translated by