0

I'm currently using Visual Studio 2013 SP1.

I have a solution (Game), with two projects, Engine and MyGame. Engine is a DLL (Can't be a lib because it builds with SFML). MyGame is an EXE, that should build with Engine. I've gotten to the point where Engine builds fine, but whenever I compile MyGame I get this error:

error LNK2019: unresolved external symbol "private: void __thiscall AABB::init(struct Vec2D,struct Vec2D)" (?init@AABB@@AAEXUVec2D@@0@Z) referenced in function "public: __thiscall AABB::AABB(double,double,double,double)" (??0AABB@@QAE@NNNN@Z)

AABB::init is one of the functions that are defined in a .cpp file, not a header file.
I have tried adding Engine as a reference in MyGame, but the same error occurs.

Tips48
  • 745
  • 2
  • 11
  • 26

1 Answers1

1

The linker is telling you that you have declared the function, but not defined it. Usually that means you have not supplied the DLL's import library (.lib) to the linker. That import library is created when you compile the DLL. You'll need to add that import library to the additional dependencies linker configuration option.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490