After installing curlpp, I attempted to compile c++ code which uses the curlpp library and got the following error:
g++ testCurl.cpp -lcurlpp
/usr/bin/ld: /tmp/ccx5aH5P.o: undefined reference to symbol 'curl_easy_setopt@@CURL_OPENSSL_3'
//usr/lib/x86_64-linux-gnu/libcurl.so.4: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Any ideas how to fix this?
I first attempted to install curlpp from source, but after running ./config, I was informed that I need boost (it's a new computer so I did not already have it installed). I installed boost. Then I was informed I needed "a working version of curl" or something like that. After a quick internet search, I found that I needed to install some version of libcurl-dev. In particular I installed the package: libcurl4-openssl-dev 7.35.0-1ubuntu2.2 After this, curlpp compiled and installed without issue.
Finally, I took some generic test code and attempted a compile using the command g++ test.cpp -lcurlpp. This led to the above error. I tried uninstalling curl and everything related and re-installing it. I also tried installing some of the alternate libcurl-dev implementations. Same error.
I have poked around the net for solutions and tried several other things. Nothing has worked so far.
Thanks in advance for any help!!
I found the dumb fix. I'll leave this up in case someone else has the same issue. You must compile with: g++ file.cpp -lcurlpp -lcurl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With