无法解决的外部错误 [英] unresolveable external error

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

问题描述

大家好

我的C代码出现错误

无法解析的外部符号"

我不明白这背后的原因是什么

请帮助

预先感谢

Hi ALL

i got error in my c code

"unresolvable external symbol"

i do not understand whats the reason behind this

kindly help

Thanks in advance

推荐答案

无法解析的外部符号"错误表示链接器无法在构建配置中设置的任何资源中找到该符号. br/>
导致此错误的三个常见原因:
1)在代码的某个位置(所引用的函数或符号的名称)中,您已经定义了函数或对象的原型,但尚未实现该函数.

2)已经使用extern关键字引入了全局变量,但是实际上并没有在任何地方声明它.

3)您的所有代码都是正确的,但是,您已经包含了一个库的头文件,该头文件要求将另一个模块链接到最终程序. C运行时库将是一个示例,或者如果您正在执行Windows套接字编程,则需要Winsock库.

如果您添加了完整的错误消息,则有人可以为在哪里查找错误提供更具体的答案.
An "Unresolvable external symbol" error indicates that the linker cannot find that symbol in any of the resources that you have setup in your build configuration.

Three common causes of this error:
1) Somewhere in your code (the name of the function or symbol that is referenced) you have defined a prototype for the function or object, but have not implemented the function.

2) Have used the extern keyword to bring in a global variable, but it is not actually declared anywhere.

3) All of your code is correct, however, you have included a header file for a library that requires another module to be linked against your final program. The C runtime library would be one example, or if you were doing windows socket programming the Winsock library would be required.

If you add the complete error message someone can provide a more specific answer for where to look for the mistake.


以获取有关其含义的一般信息,请参见

http://msdn.microsoft.com/en-us/library/f6xx1b1z (v = vs.80).aspx [
to get a general idea about what it means refer

http://msdn.microsoft.com/en-us/library/f6xx1b1z(v=vs.80).aspx[^]
To solve the particular issue that you are facing right now, pls include your code


这篇关于无法解决的外部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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