Citect Scada V8.1 (2018) update 37 complier throws an error "F4034 Cicode Function greater than 64K"

I am coding a new Cicode file after recently installing update 37, the compiler is throwing an error 

"F4034 - Cicode Function greater than 64K" ....    solution -The code generated by a Cicode file is too large. Place the functions within the file into separate Cicode files.

I checked my file and its only 26kB whereas I have one large "existing " Cicode file at 296 kB ?

is there a parameter I need to change or has the compiler changed post update 30 to now give me this error.

Parents
  • just noticed if i place my variable declarations ( approx. 150 variables of string type) before the function the error does not appear.

    i am creating a logging file.

Reply
  • just noticed if i place my variable declarations ( approx. 150 variables of string type) before the function the error does not appear.

    i am creating a logging file.

Children
  • When you say you moved the variable declarations before the function, do you mean they were after the end of the function or they were inside the function?

  • Only makes sense if it was inside the function. In that case the compiler would have to make memory reservations for the variables that would count toward the per-function limit. By placing the variable declarations before (or after) the function it changes the scope of these variables to 'module'. The compiler probably reserves a separate memory area for these.

  • Thanks Eric, declarations were inside the function, when I moved them into the file (module variable) compiler did not throw the errror.