C++项目未编译
我使用 Visual Studio 2010 创建了一个空的 C++ 控制台应用程序,并从 http://blogs.msdn.com/b/matthew_van_eerde/archive/2008/12/16/sample-wasapi-loopback-capture- record-what-you-hear.aspx 但是当我单击“重建”时,我收到了一堆错误,这些错误不会将我引导到源代码中的任何位置...源代码提供的可执行文件工作正常所以您可以检查一下吗出来告诉我我错过了什么。
更新:
Error 1 error LNK2001: unresolved external symbol _AvRevertMmThreadCharacteristics@4 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 2 error LNK2001: unresolved external symbol __imp__mmioWrite@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 3 error LNK2001: unresolved external symbol __imp__mmioCreateChunk@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 4 error LNK2001: unresolved external symbol __imp__mmioAscend@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 5 error LNK2001: unresolved external symbol _AvSetMmThreadCharacteristicsW@8 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 6 error LNK2001: unresolved external symbol __imp__mmioOpenW@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\main.obj tr
Error 7 error LNK2001: unresolved external symbol __imp__mmioClose@8 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\main.obj tr
Error 8 error LNK2001: unresolved external symbol __imp__mmioDescend@16 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\main.obj tr
Error 9 error LNK1120: 8 unresolved externals c:\users\admin\documents\visual studio 2010\Projects\tr\Release\tr.exe tr
I created an empty c++ console application with visual studio 2010 and dragged and dropped the source files from http://blogs.msdn.com/b/matthew_van_eerde/archive/2008/12/16/sample-wasapi-loopback-capture-record-what-you-hear.aspx but when I click on rebuild I get a load of errors which dont direct me anywhere in the source... The executable provided with the source works fine So can you please check it out and tell me what am I missing.
update:
Error 1 error LNK2001: unresolved external symbol _AvRevertMmThreadCharacteristics@4 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 2 error LNK2001: unresolved external symbol __imp__mmioWrite@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 3 error LNK2001: unresolved external symbol __imp__mmioCreateChunk@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 4 error LNK2001: unresolved external symbol __imp__mmioAscend@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 5 error LNK2001: unresolved external symbol _AvSetMmThreadCharacteristicsW@8 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\loopback-capture.obj tr
Error 6 error LNK2001: unresolved external symbol __imp__mmioOpenW@12 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\main.obj tr
Error 7 error LNK2001: unresolved external symbol __imp__mmioClose@8 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\main.obj tr
Error 8 error LNK2001: unresolved external symbol __imp__mmioDescend@16 c:\Users\Admin\documents\visual studio 2010\Projects\tr\tr\main.obj tr
Error 9 error LNK1120: 8 unresolved externals c:\users\admin\documents\visual studio 2010\Projects\tr\Release\tr.exe tr
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您检查源文件夹,您将看到有一些必须链接到的库:
在这种特殊情况下,您将需要进入您创建的项目的 VS2010 设置并包含这些文件。我相信该选项将属于
附加依赖项
,尽管我没有方便的 VS2010 来仔细检查。我相信
Properties>附近的C++>链接器>附加依赖项
这可能不准确,但它应该让您接近您需要的地方。您需要包含
avrt.lib、ole32.lib、winmm.lib
。Well if you check in your source folder, you'll see that there are a few libraries that must be linked to:
In this particular case, you will want to go into your VS2010 settings for the project you've created and include these files. I believe the option will fall under
Additional Dependencies
, although I don't have VS2010 handy to double check.I believe in the neighborhood of
Properties > C++ > Linker > Additional Dependencies
That may not be exact, but it should get you close to where you need to be. You'll need to include
avrt.lib, ole32.lib, winmm.lib
.