如果我使这个函数内联并从objective-c方法调用它,它会给我一个clang: error: linker command failed with exit code 1 (use -v to see invocation)
Vector addv(Vector v1, Vector v2) {// works
return (Vector){v1.x + v2.x, v1.y + v2.y, v1.z + v2.z};
}
inline Vector addv(Vector v1, Vector v2) {// if I call this, does not build
return (Vector){v1.x + v2.x, v1.y + v2.y, v1.z + v2.z};
}
为什么会这样,我能做些什么来解决它?