UpQuark
UpQuark

Reputation: 801

How do you resolve undefined reference errors from linking using libcurl?

I'm trying to compile a program with static linking so I don't have to distribute it with 30 .dlls, but -static is giving me a whole load of undefined reference errors.

I'm running

$ gcc curlgetter2BAK.cpp -lcurl -static -o a.out

which gives me an atrociously huge pile of undefine reference errors that I'm unsure as to the source of.

Upvotes: 2

Views: 513

Answers (1)

Nikolai Fetissov
Nikolai Fetissov

Reputation: 84239

-static is not a magic keyword, you need to have static versions (.a files) of all those 30 "dlls" and their dependencies.

Upvotes: 2

Related Questions