Hello,
I'm new on the forum and I encounter problems exporting code from an mBed project to GCC (Arm Embedded) toolchain.
I exported the project for GCC (Arm Embedded) toolchain then I opened it in my IDE (SW4STM32 based on Eclipse) and it doesn't compile.
The project i'm trying to export is C++.
For the declaration and initialization of the following struct :
notify_file_param_t notif = {
.bf.fid = file_id,
.bf.offset = offset,
.bf.size = size
};
I got the following error :
expected primary-expression before '.' token
I did some research and I figured out that initialization syntaxe is illegal in C++ but legal in C.
So why mBed authorize it in C++ source file ?
Is there an extention for the mBed compiler that allows it ?
How this problem can be solved ?
Thanks for any help,
Valentin
Hello,
I'm new on the forum and I encounter problems exporting code from an mBed project to GCC (Arm Embedded) toolchain. I exported the project for GCC (Arm Embedded) toolchain then I opened it in my IDE (SW4STM32 based on Eclipse) and it doesn't compile. The project i'm trying to export is C++.
For the declaration and initialization of the following struct :
notify_file_param_t notif = { .bf.fid = file_id, .bf.offset = offset, .bf.size = size };
I got the following error :
expected primary-expression before '.' token
I did some research and I figured out that initialization syntaxe is illegal in C++ but legal in C.
So why mBed authorize it in C++ source file ? Is there an extention for the mBed compiler that allows it ? How this problem can be solved ?
Thanks for any help,
Valentin