libcurl fails to function
LukeZeller (2)

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

You are viewing a single comment. View All
LukeZeller (2)

@malvoliothegood i copied it from the libcurl website. its the script thats supposed to test the library.