如何解决未解决的外部符号? [英] How to solve Unresolved External Symbols?

查看:460
本文介绍了如何解决未解决的外部符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误消息:

I got error messages:

SampleDLL.obj : error LNK2001: unresolved external symbol _DetourDetach@8
SampleDLL.obj : error LNK2001: unresolved external symbol _DetourTransactionCommit@0
SampleDLL.obj : error LNK2001: unresolved external symbol _DetourAttach@8
SampleDLL.obj : error LNK2001: unresolved external symbol _DetourUpdateThread@4
SampleDLL.obj : error LNK2001: unresolved external symbol _DetourTransactionBegin@0


我正在使用Detour Express 2.1.我构建内容.然后,我将detours.h复制到VC98 \ include文件夹,将detours.lib复制到VC98 \ lib文件夹. 然后在我的代码上:#include"detours.h".然后仍然无法成功构建.有人可以帮助我解决绕行的正确步骤吗?请....非常感谢.我知道,我做错了什么.如果可以的话,请简要列举步骤.
可以肯定的是,我还添加了.lib& .h到我的调试文件夹.仍然出现错误.


I am using Detour Express 2.1. I build the contents. Then, I copied the detours.h to VC98\include folder, detours.lib to VC98\lib folder.
Then on my code: #include "detours.h". Then still won''t build successfully. Can someone help me with the correct steps on dealing the detours? Please....thanks a lot. I know, I''ve done something wrong. Please enumerate briefly the steps if you can provide.
And to be sure, I also added the .lib & .h to my debug folder. Still got errors.

推荐答案

您可以将lib文件拖放到您的项目中. (不仅将其添加到调试目录中,因为它不会告诉链接程序使用它).
You could Drag&Drop the lib file to your project. (not just add it to the debug directory, because that will not tell the linker to use it)


您忘记了将lib文件实际链接到您的项目.
You forgot to actually link the lib file to your project.


检查 VC设置,如果LIB搜索还包括包含您的LIB文件的目录.

另外,配置链接器 项目设置以链接所需的库.
Check the VC settings, if the LIB search also include the directory containing your LIB file.

Also, configure the Linker project settings to link the required library.


这篇关于如何解决未解决的外部符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆