I got the following declaration:
// file MadaPacket.h
class MadaPacket
{
// ....
public:
inline static bool word_is_header(int w);
}
And as the correspondent declaration:
// file MadaPacket.cpp
#include "MadaPacket.h"
inline bool MadaPacket::word_is_header(int w)
{
return w == 0xFBBA;
}
MSVC12 builder fails at linkage, with the following reason:
unresolved external symbol "public: static bool __cdecl MadaPacket::word_is_header(int)
Adding static
to definition pushes error
'static' should not be used on member functions defined at file scope
Removing inline
from definition pushes error
unresolved external symbol "public: static bool __cdecl MadaPacket::word_is_header(int)
I guess I'm misunderstanding some of the definition-declaration relationship.
EDIT
Obviously I'd like to have both the modifiers, if this is possible ofc.