Well, I've been Googling for at least 30 minutes, and looking through past posts about this, but just can't seem to find an answer that works.

Basically, I've got a component class that has a single method I'm trying to test out. The entity class has a private array of these components (actually, it's an array of void*, but I cast to the appropriate type when getting the component from the array). So when I call the method it looks like this:

((Component*)myEntity.getComponent(Base))->testFunction();

This is the error I'm getting:
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall GE::Component::Component(void)" (??0Component@GE@@QAE@XZ) referenced in function _main
1>C:\Users\Asian\Documents\Development\Gigazilla Engine\Debug\Gigazilla Engine.exe : fatal error LNK1120: 1 unresolved externals

If you need me to post code, I will.

Thanks in advance

I found out what I was doing wrong. I didn't have a constructor for Component. Curse you sleepiness

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.