C++项目未编译

发布于 2024-10-05 18:27:24 字数 1847 浏览 2 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没︽人懂的悲伤 2024-10-12 18:27:24

如果您检查源文件夹,您将看到有一些必须链接到的库:

TARGETLIBS = \
    $(SDK_LIB_PATH)\avrt.lib \
    $(SDK_LIB_PATH)\ole32.lib \
    $(SDK_LIB_PATH)\winmm.lib \

在这种特殊情况下,您将需要进入您创建的项目的 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:

TARGETLIBS = \
    $(SDK_LIB_PATH)\avrt.lib \
    $(SDK_LIB_PATH)\ole32.lib \
    $(SDK_LIB_PATH)\winmm.lib \

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文