#define PRINT_ERR(format,...) printf( "Err [%s():%d] "format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
该函数在arm-himix200-linux-g++ 报错
error: unable to find string literal operator 'operator""format' with 'const char [15]', 'unsigned int' arguments
#define PRINT_INF(format,...) printf( "Inf [%s():%d] "format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
编译器版本
arm-himix200-linux-g++ (HC&C V1R3C00SPC200B005_20190606) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
看到网上说是C++11要求,当字符串跟变量连接的时候,必须format前后增加一个空格才行
#define PRINT_ERR(format,...) printf( "Err [%s():%d] " format, __FUNCTION__, __LINE__, ##__VA_ARGS__)
来源:CSDN
作者:Ronbin.L
链接:https://blog.csdn.net/xclshwd/article/details/103457463