我收到如下错误:
FxMathFunctions.h: In function 'FxInt32 IMin(FxInt32, FxInt32)':
FxMathFunctions.h:13: error: redefinition of 'FxInt32 IMin(FxInt32, FxInt32)'
FxMathFunctions.h:15: error: 'FxInt32 IMin(FxInt32, FxInt32)' previously defined here
在 FxMathFunctions.h 我有:
11: struct FxPoint2d;
12:
13: inline FxInt32 IMin(FxInt32 i1,FxInt32 i2)
14: {
15: if (i2 < i1) i1 = i2;
16: return i1;
17: }
FxInt32 在我包含的标头中定义为:
typedef long FxInt32;
如果它说 FxInt32 正在被重新定义或者整个函数是否被重新定义,我无法通过错误来决定。
我该如何解决这个问题?
更新我添加了上面的行号。