在高性能服务器上,使用icpc编译没有问题,但是在AGX上用g++编译时,出现了下面的问题
../include/f2c.h:155:19: error: expected unqualified-id before ‘(’ token
#define max(a,b) ((a) >= (b) ? (a) : (b))
^
上面的代码本身没有问题,只是使用g++编译时,max(a,b)与g++默认使用的某些宏定义冲突了,只需将max改名即可,比如
#define max1(a,b) ((a) >= (b) ? (a) : (b))