Tuesday, April 3, 2007

Static Library to DLL

After a day's slogging over my code for the engine's static library, I finally managed to make it a DLL. Surprisingly it was real easy exporting the classes in a DLL. Just do this...

#define DLL_EXPORT __declspec(dllexport)
#define DLL_IMPORT __declspec(dllimport) //Client view

class DLL_EXPORT
{

};

But setting up VS 2005 took a bit long. That was the most annoying part. To save you any future compilation issues, never compile your release build with a debug build dll :D. Always make sure your build configuration is correct. Apart from that, the DLL works like a charm. YAY no more complete re builds after an engine update is made.