this error occurs when you are using a function like sprintf() and others, that use dynamic memory / arguments.
Until AS6 the shipped libc was not complete in that regard and not all functions were supported.
You can see the limitation here: B&R Online Help
But since you are preparing for AS6, I recommend opening the project there and profit from the fact that the libc is now (more) complete: B&R Online Help
→ Just pay attention to the section Dynamic memory management (heap)
Edit: Also let me introduce you to the migration tool that will help you converting everything and reduces your workload for that conversion: here
Your information helped me to find the right way - thank you very much for this.
At the project (95% C-Code) I searched for all used functions of AsString or string.h and replaced in AS4.12 all used convertion functions between ascii and values
like (ftoa, atof, itoa, atoi) with the correspondending functions of the AsBrStr Lib.
Now I got no errors in AS4.12 but after Migration in AS6.5 I got >200 errors (nearly all have someting to do with C-Code).
Now I am struggeling to find all reasons for these errors.
E.g. : Fehler expected ‘)’ before ‘(’ token Ze: 43, Sp: 20 C:\Z\Projekte_AS60\PLC_TF3_5_950b_20251203_TST\Logical\Libraries\Logger\Logger.c
at the following code line 43
regarding a few of those you said you converted to AsBrStr: I would recommend trying to stick to C functions where possible - both AsString and AsBrStr are mainly to provide such functionality to the other languages that don’t have them already. itoa and atoi for example exist in stdlib.h, which you have access to in C
Your problem regarding the EXFUN - this is documented here: B&R Online Help in the header Declarations via macro _EXFUN, such as int _EXFUN(rand, (_VOID)), now cause an error message..
Generally speaking I would just remove it and do #include <stdlib.h> which provides you with abs() as well as itoa, ftoa, …
Also please don’t let me wait another week for a reply (although I won’t be available until january after today)
I changed the _EXFUN dependent to the help and this errors are now eliminated.
At the end I have a project without errors but it was tricky to found all error sources because there was somtimes >400 error messages and the trigger was not one of the fist messages.
My last problem at the moment is, that I have replaces in AS4.12 an AverageFilter from the discarded lib LoopCont with the block from the MTFilter lib.
But in AS6 I didn’t find the MTFilter Lib and I found also no information, that it is not supported in AS6.