Hi I face some errors on component building from Simulink with rtMaps.tlc.
I use MATLAB 2025a.
I see the following errors on the building phase. I see error C2440 and NMAKE : fatal error U1077, do you see the root cause?
And the rtmaps.tlc may be a bit old against to r2025a because I see the following warnings:
Can you try simple component building with r2025a first? I believe the warnings will reproduce with very simple models.
"Warning:Update the system target file ‘rtmaps.tlc’ to support the enhanced TLC block interface for code generation.
This update improves the efficiency of generated code for many Simulink blocks and user-defined S-Function blocks.
Failure to update the system target file might result in build errors and disruptions in code generation in future releases.
For instructions on enabling the interface, see Enable the Enhanced TLC Block Interface.
"
"Warning:Warning: Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in template makefile C:\Program Files\Intempora\RTMaps 4\tools\simulink\rtmaps_tlc_target\rtmaps_tlc\rtmaps_vc_v2.tmf. You can remove the variables.
"
Blockquote
C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c(88): error C2440: ‘=’: ‘void *’ ���� ‘map_cell_t ’ �ɕϊ��ł��܂���B
C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c(88): note: 'void’ ����� ‘void’ �^�ւ̕ϊ��ɂ͖����I�ȃL���X�g���K�v�ł��B
C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c(55): warning C4996: ‘fopen’: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c(58): warning C4996: ‘strerror’: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c(64): warning C4996: ‘fscanf’: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c(76): warning C4996: ‘fscanf’: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
NMAKE : fatal error U1077: ‘cl -c -nologo -GS -W4 -DWIN32 -D_MT -MT -Od -DLIBRARY_EXPORTS -D_USE_MATH_DEFINES -DTID01EQ=0 /MD /TP /INCLUDE:MAPSPckInit /INCLUDE:MAPSGetModulesDefStruct -DUSE_RTMODEL -DMODEL=adaptivemcl -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DMT=0 -DHAVESTDIO -DMAT_FILE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 C:\PROGRA~1\MATLAB\R2025A~1\toolbox\shared\robotics\externalDependency\amcl-localization\src\amcl\map\amcl_map_store.c’ : ���^�[�� �R�[�h ‘0x2’
Blockquote
Thanks for reporting this.
We published an update (v3.2.2 of the mathworks package). The warning related to the “Enhanced TLC Block Interface” is resolved.
But regarding the build error, it seems to come from dependencies outside of RTMaps:
Hi thank you for your reply.
I also see some warnings have gone away from the simple model.
I still see the following warning in the simple mode. Let’s discuss the warnings first.
I use VS2022 community on WIndows11, it may be related the OS support warning at least.
Blockquote
Warning: Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in template makefile C:\Program Files\Intempora\RTMaps 4\tools\simulink\rtmaps_tlc_target\rtmaps_tlc\rtmaps_vc_v2.tmf. You can remove the variables.
Regroup 4 similar
Warning: Found legacy make variables |>MASTER_ANCHOR_DIR<| in template makefile C:\Program Files\Intempora\RTMaps 4\tools\simulink\rtmaps_tlc_target\rtmaps_tlc\rtmaps_vc_v2.tmf. You can remove the variables.
Warning: Found legacy make variables |>S_FUNCTIONS<|, |>S_FUNCTIONS_OBJ<| in template makefile C:\Program Files\Intempora\RTMaps 4\tools\simulink\rtmaps_tlc_target\rtmaps_tlc\rtmaps_vc_v2.tmf. You can remove the variables.
Warning: Found legacy make variables |>SHARED_BIN_DIR<|, |>SHARED_LIB<|, |>SHARED_SRC<|, |>SHARED_SRC_DIR<| in template makefile C:\Program Files\Intempora\RTMaps 4\tools\simulink\rtmaps_tlc_target\rtmaps_tlc\rtmaps_vc_v2.tmf. You can remove the variables.
another warning
Blockquote
The following error occurred while attempting to run the preprocessor to find the minimum needed set of include files:
While parsing the source file ‘D:\dspace\rtmaps\gc1_rtmaps_build\maps_gc1.cpp’ the following error occurred
C:\Program Files\Intempora\RTMaps 4\sdk\vc.net2022_x64\include\maps_os_helpers.hpp:611:error: #error directive: “OS not supported”
| # error “OS not supported”
| ^
Reverting to full header search.
Component:Simulink | Category:Model warning
I set the mex setup again but see no change.WIndows11 may be the root cause.
Anyway I wait for your update of the environment for the point.
And one more question, can I build the generated codes in VS2022, not on Simulink?
I see the .mk file in the generated folder but no .sln file.
Beside of the listed warnings, I can investigate the detail of errors if I can build them in VS.
@Shogo
It is possible to use CMake to generate the .sln file.
Here is our template CMakeLists.txt, modified for this use case: CMakeLists.txt - Intempora Nextcloud
Put it in the generated code folder, and modify the PCK variable to your project name, and the matlab path if different.
Hi thank you for your quick reply.
I tested the attached cmakelist.txt and face version error.
In the line 1 of cmakelist, the minumum version is defined as 2.8.12 but I see the following error.
Blockquote
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
When I change the version in line 1, I see another version error during
“cmake -B build”
Blockquote
CMake Error at C:/Program Files/Intempora/RTMaps 4/templates.u/rtmaps.cmake:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
I guess the version issue is in the installation folder on my environment.
Can you also check the behavior on your new environment?
It is an option to use cmake v2.8 but the version may be too old.
Hi, I got success to create .sln file with the following command.
cmake -B build -DCMAKE_POLICY_VERSION_MINIMUM=3.5
I concluded the root cause is internal version minimum policy, I expect you to update the policy for each internal .cmake files later.
Next, I will try unify multiple models to one .sln file.
If it is possible automatically i.e. enable registering the code generation folder to a specific pck project folder, it would be much helpful.
Hi I got success merging projects manually.
Though I may need additional care when external libraries are used, I simply added source codes to the .sln fine this time.
The left issues, warnings on Windows11 and version compatibility on cmakelist.