简体   繁体   English

代码执行无法继续,因为未找到 cpprest_2_10.dll

[英]code execution cannot proceed because cpprest_2_10.dll was not found

My aim is to use the Rest API in Visual Studio.我的目标是在 Visual Studio 中使用 Rest API。 I downloaded the C++ tool vcpkg from https://github.com/Microsoft/vcpkg and followed the instructions on https://github.com/Microsoft/cpprestsdk to install cpprestsdk.我从https://github.com/Microsoft/vcpkg下载了 C++ 工具 vcpkg 并按照https://github.com/Microsoft/cpprestsdk上的说明安装了 cpprestsdk。 That worked fine.那工作得很好。

Then, in Visual Studio in the properties of the solution explorer, I included the following paths from the vcpkg folder into "VCC++ Directories->Include directories":然后,在 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\\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

vcpkg-master\\vcpkg-master\\buildtrees\\cpprestsdk\\src\\v2.10.2-718a4e55e9\\Release\\include\\pplx vcpkg-master\\vcpkg-master\\buildtrees\\cpprestsdk\\src\\v2.10.2-718a4e55e9\\Release\\include\\pplx

Then I run my code and the following errors occur:然后我运行我的代码并出现以下错误:

LNK2001 unresolved external symbols (32 errors like this) LNK2001 unresolved external symbols (像这样的 32 个错误)

I googled it and was told to include the respective ".lib"-files into "Properties->Linker->Input->Additional Dependencies" and to include the paths of the corresponding ".dll"-files into "Properties->Linker->General->Additional Library Directories", what I did.我用谷歌搜索并被告知将相应的“.lib”文件包含到“属性->链接器->输入->附加依赖项”中,并将相应的“.dll”文件的路径包含到“属性->链接器”中->General->Additional Library Directories”,我所做的。

Now, running the code again, just the following error occurs:现在,再次运行代码,只出现以下错误:

code execution cannot proceed because cpprest_2_10.dll was not found. Reinstalling the program may fix the problem code execution cannot proceed because cpprest_2_10.dll was not found. Reinstalling the program may fix the problem , code execution cannot proceed because cpprest_2_10.dll was not found. Reinstalling the program may fix the problem

although the "cpprest_2_10.dll" is in the path, which I included previously.尽管“cpprest_2_10.dll”在我之前包含的路径中。

I have no idea what the problem is.我不知道问题是什么。 Thank you in advance for your time.提前感谢您的时间。

Try to put the missing dll file right to the directory of your compiled exe.尝试将丢失的 dll 文件放到您编译的 exe 目录中。

Or check this answer to set a path so your binary can find the dll file:或检查此答案以设置路径,以便您的二进制文件可以找到 dll 文件:

How do I set the path to a DLL file in Visual Studio? 如何在 Visual Studio 中设置 DLL 文件的路径?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 代码执行无法继续,因为找不到 python37.dll - The code execution cannot proceed because python37.dll was not found Visual Studio SDL2.dll 代码执行无法继续,因为未找到 SDL2.dll - Visual Studio SDL2.dll The code execution cannot proceed because SDL2.dll was not found C++,代码执行无法继续,因为找不到 libstdc++-6.dll - C++ ,code execution cannot proceed because libstdc++-6.dll was not found 如何修复“代码执行无法继续,因为找不到SDL2_ttf.dll。 重新安装程序可能会解决此问题。“ - How to fix “The code execution cannot proceed because SDL2_ttf.dll was not found. Reinstalling the program may fix this problem.” OpenCV:无法继续执行代码,缺少DLL - OpenCV: Code Execution Cannot Proceed, DLLs Missing 程序无法执行,因为找不到 Cygcurl-4.dll - Program cannot be executed because Cygcurl-4.dll was not found 构建 C++ 可执行 Visual Studio “代码执行无法继续..” SFML - Building C++ Executable Visual Studio "The code execution cannot proceed.." SFML 编译使用OpenGL的代码时找不到libGLESv2.dll - libGLESv2.dll cannot be found while compiling code that uses OpenGL 响应代码302的CPPREST重定向位置 - CPPREST redirect location for response code 302 如何在VS项目中静态链接没有dll文件的cpprest? - How to statically link cpprest without dll files in VS project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM