inline function declaration
Hi, just a quick question. I'm running MSVC, and in my code, I have a header called CGeom.h:
Code:
#ifndef (...)
#define (...)
inline float degreesToRadians(float degrees);
#endif
In CGeom.cpp, I have the function definition for degreesToRadians:
Code:
inline float degreesToRadians(float degrees)
{
//do something
return (result);
}
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.
Can anybody tell me why this happens? :confused: