Which I downloaded from https://github.com/whoshuu/cpr and below in the page there is the example I tried to compile.
But my compiler gives this error: C:\Users\~1\~\ccNPvCtN.o main.cpp:(.text+0x78): undefined reference to `cpr::Parameters::Parameters(std::initializer_list<cpr::Parameter> const&)'
How can I solve this issue ?
Any help will be very appreciated.
Davide
Helllo Mike....
Thanks for answering me.
It seems me very strange, since I put cpr library in my \include compiler's directory (if I write '#include <cpr/cpr.>', using angular brackets; I get the same, identical error.
Anyway could you suggest me how could tell linker where to find the cpr library ?
Regards,
Davide
How to tell the linker where to find the library is dependent on how you compile your program. We need more information:
1. what is your compiler?
2. Do you compile your programs using a command line or make file? An integrated development environment (Visual Studio, for instance)?
It seems me very strange, since I put cpr library in my \include compiler's directory (if I write '#include <cpr/cpr.>', using angular brackets; I get the same, identical error.
#include statements tell the compiler which header files to include (*). They have nothing to do with telling the linker where a library is.
Do you understand the difference between a library, and a header file?
Anyway could you suggest me how could tell linker where to find the cpr library ?
As FurryGuy says, that depends on what compiler and what IDE you're using.
(*) Well, actually, they tell the preprocessor which header files to include, but that distinction doesn't matter right now.
Hello
@MikeyBoy and @FurryGuy
Thanks for helping me.
I use g++ complier and mingw.
The catch it is the first time I use a third part c++ library and I have any idea how to do.
Could give me explanations (or suggest me some online tutorials) how to deploy, use and linking a third part c++ library ?
Advanced thanks.