I am trying to correctly use DLL's in eVC3... But I'm having a lot of
problems with shared variables. Variables that exist in one DLL, used
within another. The help talk a lot about dllexport and dllimport, but
I can't stumble on a combination that works.
Basically I want Class CClass to be memory resident from one DLL, but
used from another, which if they were .c files would be:
------------foo.c------------
CClass oObject;
------------foo.h------------
extern CClass oObject;
------------bar.c------------
#include "foo.h"
oObject = _T("Ok");
-----------------------------
With foo.dll and bar.dll I would get:
error LNK2019: unresolved external symbol
From the manual, I think this should be the method:
------------foo.c------------
DllExport CClass oObject;
------------foo.h------------
extern DllExport CClass oObject;
------------bar.c------------
#include "foo.h"
DllImport oObject;
oObject = _T("Ok");
-----------------------------
But this doesn't work.
Thanks for any help in getting the correct method, regards, Ben.