You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[root@IoT-Apps lwm2m]# make
[ 2%] Building C object CMakeFiles/lwm2mclient.dir/object_test.c.o
/opt/wakaama/examples/client/object_test.c: In function ‘get_test_object’:
/opt/wakaama/examples/client/object_test.c:562:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int j = 0; j <= i; j++) {
^
/opt/wakaama/examples/client/object_test.c:562:13: note: use option -std=c99 or -std=gnu99 to compile your code
make[2]: *** [CMakeFiles/lwm2mclient.dir/object_test.c.o] Error 1
make[1]: *** [CMakeFiles/lwm2mclient.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
Hello @yan0727, can you be a bit more specific on which compiler you are using? I guess you are building with an old C-language version. You should use at least c99.
For reference, there is a discussion about which compiler versions are supported in Wakaama: #494
Indeed, GCC 4.8.5 seems to support c99, but does not default to c99. Have you tried to use -DCMAKE_C_STANDARD=99 to explicitly set the c language version?
this is operate report:
The text was updated successfully, but these errors were encountered: