Hi,
I used PEs generate a test project. Then I define a structure in ProcessorExpert.c
typedef struct {
int a;
int b;
}Test;
Then in main, I use " Test test_data;" to define it, but when I compile it, it shows:
"
Test test_data;
>expression syntax error
"
Any ideas about this?
Thanks.
-Daniel
解決済! 解決策の投稿を見る。
According to ANSI rule, the variable defination should be placed at the beginning in the function, and before program code.
I found some weird things in ProcesssorExpert.c .
When I put the "Test test_data" before calling the function " PE_low_level_init(); ", it compile the project correctly.
But when I put " Test test-data" after calling the function "PE_low_level_init();", it complains the syntax error.
According to ANSI rule, the variable defination should be placed at the beginning in the function, and before program code.