0

I have been working on this for a few hours now, and I keep getting a whole page of linker errors. All have to do with SSL in some form or fashion.

g++ -DCURL_STATICLIB -L ..\lib -o testing testing.cpp -lcurl

Im sure I am missing some parameters on this command, any ideas what they might be, or where I might find a list?

bryan sammon
  • 7,161
  • 15
  • 38
  • 48

1 Answers1

1

If you don't want SSL support, edit the configuration and undefine the preprocessor macros USE_SSLEAY and SSL_OPENSSL, and the linker errors will go away.

If you do want SSL support, you need to compile and link it in yourself, since it doesn't ship with libcurl. See this question for detail instructions on how to do that on Windows (which I assume you're using, since you mentioned MinGW).

Some other operating systems, such as Linux and Mac OS X, ship with OpenSSL, so you don't need to jump through any hoops—you can just add one of -lssl, -lopenssl, or -lcrypto to your command line, and it should just work (the exact library name varies with OSes).

Community
  • 1
  • 1
Adam Rosenfield
  • 390,455
  • 97
  • 512
  • 589