エラー:
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のバージョンを検出できますか?
前もって感謝します。