• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Argh... C++

Sign in to follow this  



So I am writing a codec for ms3d model files for my engine. Pretty routine procedure. I have two files... EvehMs3d.h and EvehMs3d.cpp for the codec (along with Eveh3D's standard Link.h and Dll.cpp files for proper bindings).

Everything good so far. Then it hit... BAM! I get linker errors. Not to hard, I thought. The weird thing? There was no reason for them.

Here are the linker errors:
3>EvehMs3d.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Eveh3D::Scene::MeshCodec::MeshCodec(void)" (__imp_??0MeshCodec@Scene@Eveh3D@@QAE@XZ) referenced in function "public: __thiscall Eveh3D::EvehMs3d::MeshCodec::MeshCodec(void)" (??0MeshCodec@EvehMs3d@Eveh3D@@QAE@XZ)
3>EvehMs3d.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Eveh3D::Scene::MeshCodec::~MeshCodec(void)" (__imp_??1MeshCodec@Scene@Eveh3D@@UAE@XZ) referenced in function "public: virtual __thiscall Eveh3D::EvehMs3d::MeshCodec::~MeshCodec(void)" (??1MeshCodec@EvehMs3d@Eveh3D@@UAE@XZ)
3>..\Debug\Plugins\EvehMs3d.dll : fatal error LNK1120: 2 unresolved externals

It is basically saying that it cannot find the import symbols (Which are defined in Eveh3D's MeshCodec.h.) However, that was, of course included, or else I would be receiving compile time errors instead.

The problem seems to be do to the compile time bindings of the symbolic names within Eveh3D's MeshCodec.h. All I needed to do was create a 1 line source file that included MeshCodec.h...And it resolved all problems.

In my opinion, this is a waste. I would be expecting #including a header file would resolve import and export symbols (They are behind EVEH_EXPORT symbol). I guess not...

Has anyone else experienced this issue? (Where they would need to create a new source file with about 1-2 lines to include another to fix linker issues?)

Oh, and did I mention the best part? It took about 3hrs to figure out. Ugh!!

Oh well, least its working now. *runs back to coding*
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement