View Single Post
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-15-2011 , 04:37   Re: undefined symbol from my own plugin
Reply With Quote #15

No, what sn4k3 has basically written is

Code:
#define LIB_SIGSCAN_CLASS CSigScanLib

// (.h file)
class LIB_SIGSCAN_CLASS
{ 
  bool Load(KeyValues *kvSigscan);
  // ...
};

// (.cpp file)
bool LIB_SIGSCAN_CLASS::Load(KeyValues *kvSigscan) {
   // function body
}
So he declares class CSigScanLib, where he declares the Load function.
Then in the .cpp file he provides the function definition of CSigScanLib::Load.
This is valid C++ code and will compile&link properly.

I don't see a reason to use the preprocessor macro there but it also doesn't do any harm.
__________________
hello, i am pm
PM is offline