cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl 7.24.0 for Windows with mingw and mingw64

From: Yang Tse <>
Date: Wed, 25 Jan 2012 23:31:47 +0100

2012/1/25 Brecht Sanders <> wrote:

> # after running configure the following fix is needed
> echo "#undef USE_THREADS_POSIX" >> lib/curl_config.h &&
> echo "#define USE_THREADS_WIN32 1" >> lib/curl_config.h &&
> echo "#undef USE_THREADS_POSIX" >> src/curl_config.h &&
> echo "#define USE_THREADS_WIN32 1" >> src/curl_config.h &&
> # remove -pthread from Makefiles
> for F in `find . -iname Makefile` ; do
> sed -i.orig "s/-pthread//" $F
> done &&
> make install-strip

> The other remarks are valid though.

Hmmm. If configure script is pulling in the pthreads stuff it is due
to configure option --enable-threaded-resolver being used.
Documentation of that option is somewhat hidden in file CHANGES.0
entry with date Apr 25 2010. As it is right now it is intended to
specifically pull the pthreads stuff into the build process and
additionally enable threaded DNS lookups.

Given that what I believe you want to achieve is to use the configure
script to build a Windows target with threaded DNS lookups using
Windows threads and not pthreads my advice to achieve that goal with
version 7.24.0 is to run configure script without using the
--enable-threaded-resolver option but defining preprocessor symbol
USE_THREADS_WIN32. Something like...

./configure CPPFLAGS='-DUSE_THREADS_WIN32=1'

I'm adding item #308 in TODO-RELEASE to remember myself that at least
some basic adjustments should be done for configure option
--enable-threaded-resolver for next release.

List admin:
Received on 2012-01-25