iPhone Developer
iPhone Developer

Reputation: 469

use of cURL library

I want to write common code that work for both iPhone and android. For that I want to use cURL library that work fine for android but for iOS it gives me following error:

(null): "_curl_easy_cleanup", referenced from:
(null): "_curl_easy_init", referenced from:
(null): "_curl_easy_perform", referenced from:
(null): "_curl_easy_setopt", referenced from:
(null): "_curl_easy_strerror", referenced from:
(null): Linker command failed with exit code 1 (use -v to see invocation)

Above error indicate some linking error for libcurl.a. I am not able to find out proper solution. Please help.

Upvotes: 1

Views: 1494

Answers (1)

Karthik T
Karthik T

Reputation: 31952

Have you added libcurl.a to the linking process of your app's compilation in XCode? If this were GCC it would be by adding a flag like -lcurl but I am not too sure about XCode.

Try this:
XCode -> Click on your project -> Your Target -> Build Settings -> Linking -> other Linker flags - here add -lcurl
The path to the library might need to be added in Build Settings -> Search paths -> Library Search Paths

Upvotes: 2

Related Questions