Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unresolved external symbol referenced in function

Tags:

c++

I realize this is a hard one to answer without providing you with huge amounts of code (which I'll try to spare you).

Essentially i'm getting this error in class X, which #includes the class Y header. The class Y header has three definitions for getters

// Getters
static ID3D10Device* PDevice();
static ID3D10Buffer* PBuffer();
static ID3D10Buffer* IBuffer();

I get three identical errors, all occur in class X. so essentially the error is:

Unresolved external symbol ID3D10Device* PDevice() referenced in function (constructor of class X)

sorry if that's a bit vague. Any idea why this might be happening? I've googled it but I can only really make an educated guess as to what this error is.

like image 412
Dollarslice Avatar asked Sep 23 '11 12:09

Dollarslice


1 Answers

First of all this is a linker error. This linker error means that the mangled name PDevice et al is not found.

Can you make sure that you have an implementation of a function that matches the definition? Also, maybe obvious but just check that you actualy have an implementation. If your implementation is in an external lib, be sure you have included the other lib in your linker.

Hope that helps!

like image 150
Roel Van Nyen Avatar answered Sep 28 '22 15:09

Roel Van Nyen