Adding libcurl to Xcode’s linker settings

by ranjith on April 5, 2009

I forget this every now and then and spend next 20 minutes searching when ever I want to add an external library to the XCode’s project linker settings. In VS2005 its just adding Additional Dependencies in Linker -> Inputs in Project Properties

For eg, Let say i want to add libcurl, openssl, libcrypto and zlib to the path. Go to Project -> Edit Project -> Linking -> Other Linker Flags


-L/usr/lib -lcurl -lssl -lcrypto -lz

Note: libcurl, libxml2 are included with the XCode’s developer libs, so think again before you set out to compile the source for libcurl to generate the libs.

  • Martin

    Thank you! Searching for this damn option..

  • http://radj.blushama.com radj

    Created a new project in XCode and added the above to the Other Linker Flags but I get the following warnings:
    - directory ‘/Users/rogercas/Desktop/libcurl_test/build/Release’ following -L not found
    - directory ‘/Users/rogercas/Desktop/libcurl_test/build/Release’ following -F not found

    Is this normal?

  • Ac

    Dude, I would be -so- embarrassed to post that question. Your account even links back to your blog, where you call yourself a programmer?

    ONE way to get around the error is to rename your OS X login to ‘rogercas’… but you should only do this as a last resort, if you can not guess what the OTHER way to fix the directory error is.

blog comments powered by Disqus

Previous post:

Next post: