Hi, just a quick question. I'm running MSVC, and in my code, I have a header called CGeom.h:
In CGeom.cpp, I have the function definition for degreesToRadians:Code:#ifndef (...) #define (...) inline float degreesToRadians(float degrees); #endif
When I compiled this with the debug settings, it worked fine; under Release build, I got a unresolved external symbol for degreesToRadians. The problem went away when I just merged the definition and prototype(?) together in the header, instead of having them separate.Code:inline float degreesToRadians(float degrees) { //do something return (result); }
Can anybody tell me why this happens?