A couple of possibilities.
1.) Is the DLL in the SAME directory as the executable you are using to open up the DLL?
If not, then you'll get a run time error similar to that because the program cannot pick up the DLL. To solve this, just copy your DLL to the same location as the program executable.
2.) (as questioned) Are you defining the imports/exports correctly?
this would be something like:
#ifdef MYDLL_EXPORTS
#define MYDLL_API __declspec(dllexport)
#else
#define MYDLL_API __declspec(dllimport)
#endif
#ifdef MYDLL_EXPORTS
#define MYDLL_API __declspec(dllexport)
#else
#define MYDLL_API __declspec(dllimport)
#endif
To copy to clipboard, switch view to plain text mode
You need to set MYDLL_EXPORTS as a pre-processor definition in your DLL project, but leave it blank in the application.
Bookmarks