Cannot solve LNK 2001 error in Visual Studio

1.4k Views Asked by At

I am working on a very big project, some hundred of .c and .h files, so I just cannot upload them here. I am running the Release in Visual Studio.

I am getting these errors:

Severity    Code    Description Project Path    File    Line    Source  Suppression State   Tool
Error   LNK2001 unresolved external symbol _drawExitSurface raytrace    C:\Users\Winter\Desktop\Newfolder   C:\Users\Winter\Desktop\Newfolder\ray-main.obj  1   Build       Link

Severity    Code    Description Project Path    File    Line    Source  Suppression State   Tool
Error   LNK2001 unresolved external symbol _calcDampingandImpulseResponse   raytrace    C:\Users\Winter\Desktop\Newfolder   C:\Users\Winter\Desktop\Newfolder\ray-main.obj  1   Build       Link

And others, as shown in the picture below: enter image description here

I found that that the ray-main.obj, Raytrace-SINGLE.obj and Raytrace-STRAYL.obj are in Release folder, so I did this: search them down in the solution explorer, right click and click Include in Project. Also, in the Property->Linker-> Input-> Additional Dependencies, I included the paths to the mentioned obj files.

Can anyone please help? Thank you!

1

There are 1 best solutions below

1
On

The error unresolved external symbol _drawExitSurface means that you forgot to link the obj or lib file which contain the symbol _drawExitSurface. Or you forgot to compile the source that include the symbol.