954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

1 unresolved externals...ugh

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

epicasian
Junior Poster in Training
53 posts since Nov 2009
Reputation Points: 12
Solved Threads: 0
 

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

epicasian
Junior Poster in Training
53 posts since Nov 2009
Reputation Points: 12
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: