"错误LNK2019:​​无法解析的外部符号QUOT;错误在Visual Studio 2010 [英] "error LNK2019: unresolved external symbol" error in Visual Studio 2010

查看:216
本文介绍了"错误LNK2019:​​无法解析的外部符号QUOT;错误在Visual Studio 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译和运行正在使用 libsndfile 库声音文件处理一个C code。

I'm trying to compile and run a C code that is using libsndfile library for sound files processing.

我添加使用此路径的头文件:
项目的属性(在C / C ++ - >常规 - >附加包含目录)

I have added the header file using this path: project's Properties (in C/C++ -> General -> Additional Include Directories)

我也有链接使用此路径的库:
项目属性 - >链接 - >输入 - >附加依赖。

Also i have linked the library using this path: Project Properties -> Linker -> Input -> Additional Dependencies.

不过,在调试时,我得到了以下错误:

But while debugging, i get the following errors:

1 GT; sil.obj:警告LNK4075:忽略由于'/ EDITANDCONTINUE''/增量:NO'规范
1> sil.obj:错误LNK2019:​​解析外部符号_sf_write_sync函数引用_main
1> sil.obj:错误LNK2019:​​在函数_main引用解析的外部符号_sf_write_double
1> sil.obj:错误LNK2019:​​解析外部符号_sf_close函数引用_main
1> sil.obj:错误LNK2019:​​在函数_main引用解析的外部符号_sf_read_double
1> sil.obj:错误LNK2019:​​在函数_main解析的外部符号引用_sf_open
1> C:\\用户\\亚南\\文档\\ Visual Studio 2010的\\项目\\沉默\\调试\\ silence.exe:致命错误LNK1120:5无法解析的外部

有人可以在这里找出问题所在?我是新的使用Visual Studio,我真的很需要帮助!

Can someone please identify the problem here? I'm new at using Visual Studio and I really need help!

推荐答案

我面临同样的问题。我解决了它如下:

I faced the same problem. I solved it as follows.

1)请确保您下载的是32位libsndfile(libsndfile-1.0.25-W32-的setup.exe)包,因为Visual Studio的编译器是32位的。

1)Make sure that you are downloading the 32 bit libsndfile(libsndfile-1.0.25-w32-setup.exe) package because the Visual studio compiler is 32 bit.

2)通过点击SETUP.EXE(libsndfile-1.0.25-W32-的setup.exe)libsndfile的文件安装库。

2)Install the library by clicking on the setup.exe(libsndfile-1.0.25-w32-setup.exe) file of libsndfile.

3)创建项目后,执行以下两个步骤:

3)After creating your project, do the following 2 steps:

我)进入调试>>项目属性>>配置属性>> C / C ++ >>通用>>附加包含目录>>点击在右边的箭头,然后单击编辑>>这里,加包括文件夹在你的libsndfile目录的路径。

i)Go to Debug >> Project Properties >> Configuration Properties >> C/C++ >> General >> Additional Include Directories >> Click on the arrow on the right hand side and then click on edit >> Here, add the path of the include folder in your libsndfile directory.

ii)在步骤(i)完成后,点击>>通用>>连接器在配置属性附加库目录>>点击箭头右侧,然后点击编辑>>在这里,添加路径该.LIB文件。您可能需要在整个路径类型,因为浏览选项不显示的.lib文件。所以,在我的情况我输入C:\\ Program Files文件(x86)的\\兆书呆子\\ libsndfile \\ LIB \\ libsndfile-1.lib

ii)After step (i) is complete, click on Linker in Configuration Properties >> General >> Additional Library Directories >> Click on the arrow on the right hand side and then click on edit >> Here, add the path of the .lib file. You may have to type in the entire path since the browse option does not show the .lib file. So, in my case I typed C:\Program Files (x86)\Mega-Nerd\libsndfile\lib\libsndfile-1.lib.

最后,你做!您code应编译并没有抛出任何错误现在的工作。

Finally, you are done! Your code should compile and work now without throwing any errors.

这篇关于"错误LNK2019:​​无法解析的外部符号QUOT;错误在Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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