Tip / ログイン to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

PSoC Creator™でプロジェクトをビルド中のエラーメッセージ「expected '='、 '、'、 ';'、 'asm' or '__attribute__' before 'typedef'」-PSoC Creator™でプロジェクトをビルド中 - KBA222957 - Community Translated (JA)

PSoC Creator™でプロジェクトをビルド中のエラーメッセージ「expected '='、 '、'、 ';'、 'asm' or '__attribute__' before 'typedef'」-PSoC Creator™でプロジェクトをビルド中 - KBA222957 - Community Translated (JA)

SivaK_96
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

Community Translated by  NoTa_4591161        Version: **

Translation - English: Error Message “expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef’” While Building a P...

質問:

PSoC Creator™でプロジェクトをビルドしたとき、「expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'」というエラーメッセージが表示されます。この問題を解決するにはどうすればよろしいでしょうか?

回答:

includeステートメントの前のコード行の構文に従わない場合、Arm®GCCは最初のインクルードの最初の行の前に発生したとしてエラーを報告します。以下に示すように、stdlib.hのコードの最初の行に余分な文字「a」が追加されている例を考えてみます。

a//sample

#include <stdlib.h>

#include <stdio.h>w

#include <string.h>


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


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

1.png
この例では、GCCコンパイラーはstddef.h構文エラーを報告しますこれは以下に示すエラーメッセージに似ています。

pastedImage_29.png

エラーを解決するには、余分な文字「a」を削除します。

0 件の賞賛
503 件の閲覧回数
寄稿者