Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Error Message “expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef’” While Building a Project in PSoC Creator™- KBA222957

Error Message “expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef’” While Building a Project in PSoC Creator™- KBA222957

Community-Team
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

Version: **

Translation - Japanese: PSoC Creator™でプロジェクトをビルド中のエラーメッセージ「expected '='、 '、'、 ';'、 'asm' or '__attribute__' before 'typedef'...

Question:

The " expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef' " error message appears while building a project in PSoC Creator™. How can I fix this issue?

Answer:

If you do not follow the syntax for lines of code before the include statement, Arm® GCC reports the error as occurring before the first line of the first include. Consider an example where an extra character ‘a’ is added to the first line of the code, in stdlib.h, as shown below:

a//sample

#include <stdlib.h>

#include <stdio.h>w

#include <string.h>


int main (int argc, char** argc) {}


In this example, GCC compiler will report a syntax error in stddef.h, which will be similar to the error message shown below:

pastedImage_29.png

To resolve the error, remove the extra character ‘a’.

0 Likes
4035 Views
Contributors