
Employee
Jul 05, 2020
11:13 PM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Jul 05, 2020
11:13 PM
PSoC Creator™でプロジェクトをビルド中のエラーメッセージ「expected '='、 '、'、 ';'、 'asm' or '__attribute__' before 'typedef'」-PSoC Creator™でプロジェクトをビルド中 - KBA222957 - Community Translated (JA)
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) {}
この例では、GCCコンパイラーはstddef.hに構文エラーを報告します。これは、以下に示すエラーメッセージに似ています。
エラーを解決するには、余分な文字「a」を削除します。
Rate this article: