Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open include file: 'cpprest/http_client.h'

I'm trying to run c++ windows application using casablanca 'c++ rest sdk' for REST requests. I've created new 'CLR Empty Project' (visual studio 2012) and added new item - 'Windows Form'. added some code and was able to see a form when running the projects. now, I have installed the c++ rest sdk using NuGet, as the instructions tell. it all went successfully. the problem is that in order to use the 'c++ rest sdk' I've added these:

#include <cpprest/http_client.h>
#include <cpprest/filestream.h> 

and it doesn't find those files. I'm getting

fatal error C1083: Cannot open include file: 'cpprest/http_client.h': No   such file or directory

Project screenshot: project screenshot

thanks!

like image 351
user2880391 Avatar asked Sep 02 '25 02:09

user2880391


1 Answers

you have to include this path :

C:\YourProject\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.8.0\build\native\include

and:

C:\YourProject\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.8.0\lib

I've got the same issue after I added the NuGet package. The include and lib folders are not linked automatically as the description says.