Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

code execution cannot proceed because cpprest_2_10.dll was not found

My aim is to use the Rest API in Visual Studio. 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. 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":

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

Then I run my code and the following errors occur:

LNK2001 unresolved external symbols (32 errors like this)

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.

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,

although the "cpprest_2_10.dll" is in the path, which I included previously.

I have no idea what the problem is. Thank you in advance for your time.

like image 673
johnny9876 Avatar asked Jul 24 '18 14:07

johnny9876


1 Answers

Try to put the missing dll file right to the directory of your compiled exe.

Or check this answer to set a path so your binary can find the dll file:

How do I set the path to a DLL file in Visual Studio?

like image 139
nio Avatar answered Oct 07 '22 22:10

nio