error LNK2019:unresolved external symbol的解决方法
来源:互联网 发布:淘宝网宋大师旗舰店 编辑:程序博客网 时间:2024/04/29 11:03
我们都知道,当我们在链接程序的时候,出现了如下错误,那是代表,程序没有找到在.h文件中定义的函数的实现。
error LNK2019:unresolved external symbol
有可能是我们自己的的库函数的lib文件没有添加正确,也有可能是系统的某个lib文件没有添加正确。
当出现这个问题的时候,首先第一步是要仔细看错误信息里面报的具体是哪一个文件里的哪一个函数的哪一个引用,比如如下错误信息:
error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: char * __thiscall SLPAttributeRequest::A(int &)" (?GetAttributeRequestBuffer@SLPAttributeRequest@@QAEPADAAH@Z)
从上可知,是在SLPAttributeRequest::A函数中的htons这个变量没有找到对应的实现。
然后去百度htons(http://blog.csdn.net/jfkidear/article/details/7870743),发现它是出现在ws2_32.lib这个文件中的,所以我们将该lib文件,通过Project->property->linker->input->addtional dependencies,添加到工程中。
通过解决这个问题的都到了一个经验,遇到问题的时候不要想当然的觉得就是某个问题引起的,一定要先仔细分析事故现场,提取出有价值的信息,然后再做判断。
- error LNK2019:unresolved external symbol的解决方法
- C++ error LNK2019: "unresolved external symbol"解决方法
- error LNK2019 【unresolved external symbol】 解决方法
- Bug:error LNK2019: unresolved external symbol的一种解决方法
- Error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- Error LNK2019: unresolved external symbol
- error LNK2019:unresolved external symbol
- error LNK2019: unresolved external symbol
- error LNK2019:unresolved external symbol
- Error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- error LNK2019: unresolved external symbol
- 【error LNK2019: unresolved external symbol】
- [嵌入式]移植到纯净版本的uboot1.1.6过程--OK6410
- 使用PJSIP库,获得当前时间
- flex传递参数-------TitleWindow向主页面传递参数(2)
- Oracle 删除用户和表空间
- powerpoint 2007 中怎么插入flash动画
- error LNK2019:unresolved external symbol的解决方法
- $0,$1,$2 and set - in shell ,awk ,sed,function ,perl
- python 系统学习笔记(六)---元组
- android 输入法模块,根据当前输入法,改变可以切换的输入法数组。
- 如何在网页中嵌入WMV格式或RM视频文件
- Qt中的Q_OBJECT宏必须要加上
- Linux C编程--string.h函数解析
- 安装axel
- (1)简单工厂模式