C中的LNK错误2001 [英] LNK ERROR 2001 in c

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

问题描述

大家早上好.我正在尝试在MS Vc ++ 2008中创建c项目.我在头文件中都包含了所有声明.而且我已经将其包含在主程序中.但是会出现如下错误:

Good morning to everyone. I''m trying to create c project in MS Vc++ 2008. I have all the declaration in the header files. And i have included it in the main program. But there comes error as follows:

Error   1   error LNK2001: unresolved external symbol _quant_vals   encoder.obj mdc
Error   2   error LNK2001: unresolved external symbol _hifilt   encoder.obj mdc
Error   3   error LNK2001: unresolved external symbol _lofilt   encoder.obj mdc
Error   4   error LNK2001: unresolved external symbol _w_tree   encoder.obj mdc
Error   5   error LNK2001: unresolved external symbol _q_tree   encoder.obj mdc
Error   6   fatal error LNK1120: 5 unresolved externals F:\PROJECT MDC\mdc\Debug\mdc.exe    1   mdc



如果我右键单击该变量,然后转到声明.它正确地进入了声明部分.



If i right click on the variable and go to the declaration. It goes to the declaration part correctly.

How to solve this????

推荐答案

仅包含头文件是不够的,您应该链接库(.lib)文件.
选择Project->Properties菜单项,然后(在新出现的窗口中)选择Configuration Properties->Linker->Input节点,最后在Additional Dependecies行中添加适当的.lib文件. :)
Including the headers is not enough, you should link with the library (.lib) file.
Select the Project->Properties menu item, then (in the newly appeeared window) select the Configuration Properties->Linker->Input node and finally add the appropriate .lib file in the Additional Dependecies row.
:)


这篇关于C中的LNK错误2001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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