Search code examples
exceptionlinkerembeddedstm32iar

IAR Compiler Linker Error [Li009]: _CPP_Exceptions must be disabled but module has the value 'Used'


I have a project which compiles with the IAR compiler just fine. But when IAR trys to link it, i get the following error:

 Module DMA.o(touchgfx_core.a) specifies
        that '__CPP_Exceptions' must be 'Disabled', but module
        TouchGFXConfiguration.cpp.obj has the value 'Used'

I looked at the TouchGFXConfiguration and all the files it includes but i can't find any code related to exceptions. I also checked if there is a compiler or linker flag / setting that i can set which disables exceptions but that didn't help either. Has anyone an idea what could cause the error ?


Solution

  • it does not matter what you have in the code, the compiler options are important. Simple disable exceptions. It is wise to disable RTTI as well as it consumes a lots of resources

    enter image description here