开发者

An error when compiling using curlpp

开发者 https://www.devze.com 2022-12-19 23:29 出处:网络
I tried to compile first simple example, and see compile error: undefined reference to `curlpp::Cleanup::Cleanup()\'

I tried to compile first simple example, and see compile error: undefined reference to `curlpp::Cleanup::Cleanup()'

In linker options i wrote curl-config --libs, in command line

$ curl-config --libs

-lcurl

What am I do开发者_StackOverflowing wrong?


You don't want to link your program against plain-C curl (-lcurl), but against curlpp! Use -lcurlpp instead. You may also call curlpp-config --libs.

Don't forget: curl (without "pp") is a C library, the C++ library is called curlpp

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号