Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 无法解决Visual Studio中的LNK 2001错误_C_Visual Studio_Lnk2001_Lnk2005 - Fatal编程技术网

C 无法解决Visual Studio中的LNK 2001错误

C 无法解决Visual Studio中的LNK 2001错误,c,visual-studio,lnk2001,lnk2005,C,Visual Studio,Lnk2001,Lnk2005,我正在做一个非常大的项目,大约有几百个.c和.h文件,所以我不能在这里上传它们。我正在运行VisualStudio中的发行版 我发现以下错误: Severity Code Description Project Path File Line Source Suppression State Tool Error LNK2001 unresolved external symbol _drawExitSurface raytrace C:\Users\

我正在做一个非常大的项目,大约有几百个.c和.h文件,所以我不能在这里上传它们。我正在运行VisualStudio中的发行版

我发现以下错误:

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

等,如下图所示:

我发现ray-main.obj、Raytrace-SINGLE.obj和Raytrace-STRAYL.obj都在Release文件夹中,所以我这样做了:在解决方案资源管理器中向下搜索它们,右键单击并单击Include in Project。另外,在Property->Linker->Input->Additional Dependencies中,我包含了指向上述obj文件的路径

有人能帮忙吗?
谢谢大家!

错误未解析的外部符号drawExitSurface表示您忘记链接包含符号的obj或lib文件
drawExitSurface
。或者您忘记编译包含符号的源代码。

@khabbabzakaria您看到我的答案了吗?您是否找到了与_paurexitsurface对应的源代码或库文件(搜索时不带下划线,这可能是编译器添加的)。