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?
Asked
Active
Viewed 1,727 times
2
-
Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Apr 09 '19 at 01:22
-
***Should I have a dll or lib file?*** yes. – drescherjm Apr 09 '19 at 01:24
-
@drescherjm I downloaded the cURLpp source code and there was no dll or lib file - is this something I can generate myself from the source code? – Keelan Pool Apr 09 '19 at 01:25
-
It's built using CMake. That is what the CMakeLists.txt file is in the `curlpp-0.8.1` folder of the download. – drescherjm Apr 09 '19 at 01:26
-
@drescherjm is there a reason the dll file isn't just made available? – Keelan Pool Apr 09 '19 at 01:34
-
Probably because the source code is for multiple compilers and operating systems. Many open source projects use CMake these days. – drescherjm Apr 09 '19 at 01:35
-
@drescherjm I've run cMake with cURL, but when trying to run with cURLpp it says it isn't installed – Keelan Pool Apr 09 '19 at 04:41
-
I assume it said that it can't find curl when you tried to configure. – drescherjm Apr 09 '19 at 11:58
-
You may want to investigate using vcpkg. https://github.com/Microsoft/vcpkg both curl and curlpp are in vcpkg and will be automatically downloaded and compiled with a few simple commands after you get vcpkg installed. – drescherjm Apr 09 '19 at 12:00
-
See here to see the list of packages that vcpkg can build for your compiler. https://github.com/Microsoft/vcpkg/tree/master/ports – drescherjm Apr 09 '19 at 12:02
-
@drescherjm thanks, I'll check that out! – Keelan Pool Apr 09 '19 at 20:33
1 Answers
2
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:
- Run cmd command:
vcpkg install curlpp:x64-windows
- goto Project > Configuration Properties -> Linker -> General -> Additional Library Directories, add
yourVcpkgFolderPath\vcpkg\installed\x64-windows\lib\
- goto Project > Configuration Properties -> Linker -> Input -> Additional Dependencies, add
curlpp.lib
Then build the project, it should build success.

yu yang Jian
- 6,680
- 7
- 55
- 80