I am generating C/C++ code from a Simulink model using Simulink Coder or Embedded Coder.
When I try to compile the generated code by running the .bat file, I get a linking error complaining about a conflict between LIBCMT and MSVCRT, with a suggestion to add the /NODEFAULTLIB:libname option to the linker flags.
I have found that adding this option to the ADDITIONAL_LDFLAGS field of the generated .mk file solves the issue. How can this option be automatically added to the generated makefile?
Best Answer