错误:
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()
电话?提前感谢。
答案 0 :(得分:4)
你拼错了defined
:
#if definied(_WIN32) || definied(_WIN64) || definied(__WIN32__)
#elif definied(__linux) || definied(__linux__) || definied(linux)
应该是:
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__)
#elif defined(__linux) || defined(__linux__) || defined(linux)