I started with learning C++ a few days ago and I would like to get some data to make it more funny. I found a powerful C++ library called Unirest that can help me to get data from many APIs and after practice the basics :)
I don't know how to include libraries into my project. I fond some videos about how to do it so I just created libs
folder (like i always do when I'm programming in PHP) and I copied library files. After I included header file UNIRest.h
into my source and added the libs
directory into VS+ Directories option in Project Properties - Configuration Properties - VC+ Directories. Everything is still OK. But when I opened the header file UNIRest.h
the problem appeared:
#import "UNIHTTPRequest.h"
#import "UNIHTTPRequestWithBody.h"
#import "HttpRequest/UNISimpleRequest.h"
#import "HttpRequest/UNIBodyRequest.h"
#import "HttpResponse/UNIHTTPBinaryResponse.h"
#import "HttpResponse/UNIHTTPJsonResponse.h"
#import "HttpResponse/UNIHTTPStringResponse.h"
All of those macros are underlined and compilation failed with message:
fatal error C1083: Cannot open type library file: 'libs\unirest\unihttprequest.h': Error loading type library/DLL.
Could you please help me? Hope it's not just a stupid question because I tried to make it works whole afternoon :(
#include
header files. But as @Foxworth says, there is no C++ version of this library. So you'll need to try a different library (or switch languages:) – Tavey