gpt4 book ai didi

windows-8 - Visual Studio 2012 : Unresolved external symbol _BluetoothFindFirstRadio

转载 作者:行者123 更新时间:2023-12-02 05:17:45 26 4
gpt4 key购买 nike

我正在尝试在 Win32 控制台应用程序项目中使用一些蓝牙功能 ( http://msdn.microsoft.com/en-us/library/windows/desktop/aa362927(v=vs.85).aspx )。包含相关 header 后,我在编译期间遇到如下链接器错误:

Error   1   error LNK2019: unresolved external symbol _BluetoothFindFirstRadio@8 referenced in function _wmain

我一直假设我无法链接到 Windows 8 SDK。打开项目属性,我的目标框架是 .NET 4.0,我不能更改它,也没有我可以添加的引用。

我可能完全偏离了基地。如何解决此编译错误?

enter image description here

最佳答案

由于您正在编译 native 代码 (Win32),因此添加引用将无法像在 C#/.NET 中那样工作。你需要做的是;

  • 为您的项目选择“属性”。
  • 展开“配置属性”。
  • 展开“链接器”。
  • 选择“输入”。
  • 将“Bthprops.lib”添加到“附加依赖项”。

Bthprops.lib 在 BluetoothFindFirstRadio documentation 中根据需要被提及.

编译,一切正常

关于windows-8 - Visual Studio 2012 : Unresolved external symbol _BluetoothFindFirstRadio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14366160/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com