2016-03-22 04:11 AM
I'm using System Works IDE, and when I compile my stm32 program I get an error.
error: 'for' loop initial declarations are only allowed in C99 or C11 mode. I know what the complaint is about but how do I set up C11compiler mode, I cant find a switch in the settings dialog box. thanks2016-03-22 06:19 AM
Try .cpp file, or ''Compile as C++'' like options, I don't use this IDE
2016-03-22 06:53 AM
I guess that you are using c90 as dialect.
this compilation error appears when you are not using C99 and you have written this kind of code :for(int i=0; ....to fix this problem, you have two options:For me I would prefer to change my code to be dialect compliant.
And if I had to change dialect I will use gnu99 (not c99) since SystemWorkbech uses a GNU compiler (other dialect flags : -std=gnu99)Regards,TarekB2016-03-22 02:27 PM