c++ - 代码执行无法继续,因为找不到 cpprest_2_10.dll
问题描述
我的目标是在 Visual Studio 中使用 Rest API。我从https://github.com/Microsoft/vcpkg下载了 C++ 工具 vcpkg并按照https://github.com/Microsoft/cpprestsdk上的说明安装 cpprestsdk。那工作得很好。
然后,在解决方案资源管理器的属性中的 Visual Studio 中,我将 vcpkg 文件夹中的以下路径包含到“VCC++ 目录->包含目录”中:
vcpkg-master\vcpkg-master\buildtrees\cpprestsdk\src\v2.10.2-718a4e55e9\Release\include\cpprest
vcpkg-master\vcpkg-master\buildtrees\cpprestsdk\src\v2.10.2-718a4e55e9\Release\include
vcpkg-master\vcpkg-master\buildtrees\cpprestsdk\src\v2.10.2-718a4e55e9\Release\include\pplx
然后我运行我的代码并出现以下错误:
LNK2001 unresolved external symbols
(32个这样的错误)
我用谷歌搜索并被告知将相应的“.lib”文件包含到“属性->链接器->输入->附加依赖项”中,并将相应“.dll”文件的路径包含到“属性->链接器”中->General->Additional Library Directories”,我做了什么。
现在,再次运行代码,只是出现以下错误:
code execution cannot proceed because cpprest_2_10.dll was not found. Reinstalling the program may fix the problem
,
虽然“cpprest_2_10.dll”在我之前包含的路径中。
我不知道问题是什么。提前感谢您的宝贵时间。
解决方案
推荐阅读
- shopify - 想要在有人更新数量时更新 Shopify 购物车
- php - 当我尝试更新唯一字段时出现laravel错误
- android - 在 Android 应用程序中哪里可以安全地保存静态信息?
- android - 在类型比较期间出现 assertEquals 问题
- javascript - 每行上的数据表获取按钮
- apache-spark - 如何打乱 PySpark DataFrame 的每一列中的数据?
- python - Python Pandas:根据小时和日期绘制值
- angular - Spring boot Restful API + Oauth2 + Angular - 如果用户在一段时间内不活动,则注销
- javascript - 为什么总是只画第一张桌子?
- javascript - bootstrap-datepicker 错误:datepicker 不是函数