未定义参考错误的含义 [英] Meaning of Undefined reference error

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

问题描述

未定义的引用错误是指缺少声明或定义或两者?

Undefined reference error refers to missing declaration or the definition or both?

编译器:Linux上的GCC

Compiler: GCC on Linux

推荐答案

通用(如果不是总是?)这是一个链接器错误,这意味着缺少定义。缺少声明的编译错误类似于:XXX未在此作用域中声明。

Usualy (if not always?) it's a linker error and it means missing definition. Compilation errors for missing declarations are similar to: "XXX was not declared in this scope."

这篇关于未定义参考错误的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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