简体   繁体   中英

How do I use cURLpp with Visual Studio?

I'm using VS 2019, have downloaded all the cURLpp headers, put them and the cURL headers in an include folder and added this include directory under Project Properties -> Additional Include Directories. When I try to build example00.cpp from the cURLpp site, I get errors saying I have an unresolved external symbol. I've never used a third party library with C++ before, so please explain like I'm an idiot. Should I have a dll or lib file?

I use vcpkg to install curlpp , and I find that my project configuration in visual studio is x64 , if I use x86 curlpp it will get build error, I need to use x64 curlpp then build sucess.

This is the include step:

  1. Run cmd command: vcpkg install curlpp:x64-windows
  2. goto Project > Configuration Properties -> Linker -> General -> Additional Library Directories, add yourVcpkgFolderPath\\vcpkg\\installed\\x64-windows\\lib\\
  3. goto Project > Configuration Properties -> Linker -> Input -> Additional Dependencies, add curlpp.lib

Then build the project, it should build success.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM