I'm trying to link against a dll that I have all the source for, but I can't get access to a dirt simple class I've created in it without getting LNK2019's.
I made this:
class makeprob
{
public:
makeprob();
~makeprob();
};
with the implementation:
makeprob::makeprob() { }
makeprob::~makeprob() { }
as a nice simple template. Then in my actual project, I have the following:
#include "evil_dll.h"
class PC
{
public:
PC() { };
~PC() { };
static makeprob ProblemCreator;
};
with the implementation:
#include "evil_dll.h"
makeprob PC::ProblemCreator;
When I then try to link against it and construct a makeprob class, I get
LNK2019 unresolved external symbol "public: __thiscall makeprob::makeprob(void)" (??0makeprob@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'public: static class makeprob PC::ProblemCreator''(void)" (??__E?ProblemCreator@PC@@2Vmakeprob@@A@@YAXXZ)
I've checked that I'm linking against the lib and I am. From everything I can tell, the dll is a 32 bit dll to go with my 32 bit app. I am already using functions from the dll, but they've been declared with __declspec(dllimport)
I have to admit; I'm all thumbs with this. I have no idea if I'm supposed to do anything specific on the receiver to bring a class across from a dll. This is part of a school test, and part of the instructions tell me I don't need to edit the source code (just use the provided classes). I only created the makeprob class to make the problem simple to post up here.
Any advice would be invaluable! Thank you so much!