cURL / Mailing Lists / curl-library / Single Mail


use libcurl source files directly rather than link with library

From: Tom Bishop, Wenlin Institute <>
Date: Mon, 16 May 2011 17:06:18 -0400

Dear libcurl Users,

Is it possible to use libcurl by compiling its source files together with my application's source files, rather than first building libcurl as a library and then linking with the library?

My application runs on several platforms and uses several libraries. Building and linking with all the libraries on all the platforms is often problematic due to mismatches between 32-bit and 64-bit versions; cross-compiling from one platform to another; using shared versus static libraries; installing or distributing the libraries if they are shared; conflicts with different versions of the libraries that may already be installed; etc. I find it is often simpler and easier to include a library's C source files in my application's project or makefile. (A great example of a library that is easy to use in this way is SQLite, for which you simply #include sqlite.h, and add sqlite.c to your project or makefile. Other libraries require dozens of files, but it's the same idea.)

I've tried to figure out how to do it with libcurl, but so far the makefile is too complicated for me to understand; and lib/easy.c can't be compiled without defining various macros. If anyone can offer advice I'd really appreciate it.

Best wishes,


文林 Wenlin Institute, Inc. Software for Learning Chinese
E-mail: Web:
Telephone: 1-877-4-WENLIN (1-877-493-6546)

List admin:
Received on 2011-05-16