Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

libcurl fails to function

LukeZeller
LukeZeller

i am trying to use the libcurl source in a simple test application, but when I run it I get:

main.cpp:9:17: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] char *url = "http://stackoverflow.com"; ^ 1 warning generated. /tmp/main-428a37.o: In function `main': main.cpp:(.text+0x41): undefined reference to `curl_easy_init' main.cpp:(.text+0x7e): undefined reference to `curl_easy_setopt' main.cpp:(.text+0x98): undefined reference to `curl_easy_setopt' main.cpp:(.text+0xb2): undefined reference to `curl_easy_setopt' main.cpp:(.text+0xc1): undefined reference to `curl_easy_perform' main.cpp:(.text+0xcd): undefined reference to `curl_easy_cleanup' clang: error: linker command failed with exit code 1 (use -v to see invocation) compiler exit status 1

does anyone know what causes this? the website says I can use it with c++
heres a link to the repl: https://repl.it/@LukeZeller/FTP

4 years ago
You are viewing a single comment. View All
1

It looks pretty fierce/advanced looking code. Do you understand it or did you just copy and paste it from somewhere and hoped it would work?

3 years ago
1

@LukeZeller

I googled your error and found an answer on this page that could help you: https://www.quora.com/Why-are-string-literal-conversions-to-char*-deprecated-in-C++

3 years ago