-7
cxx.cpp:5:13: error: missing binary operator before token "("
cxx.cpp:7:15: error: missing binary operator before token "("
コード:
#if definied(_WIN32) || definied(_WIN64) || definied(__WIN32__)
const char * PORT = "COM1";
#elif definied(__linux) || definied(__linux__) || definied(linux)
const char * PORT = "dev/ttyS1";
#else
const char * PORT = NULL;
#endif
質問:コンパイラは、新しいdefined()
呼び出しを待っている
- を
- それを?任意のLinux(およびバリアント)またはWindowsのバージョンを検出できますか?
ありがとうございました。
これはおそらく、あなたの実際のコードではないように(明確にコピーアンドペーストタイプミスです "definied")、この答えるのは難しいです。 –
'definied'、本当ですか? – Mat
プリプロセッサのコードサンプル全体にミスペルドが定義されています。 – talonmies