cURL / Mailing Lists / curl-library / Single Mail


[windows build fix?] Binding to wrong MS CRT when building MS VC++

From: Daniel Stenberg <>
Date: Thu, 19 May 2011 23:29:28 +0200 (CEST)

Hi friends,

I would appreciate if one of you who knows a little about building (libcurl)
on Windows and MSVC could have a look at/comment this:

---------- Forwarded message ----------
Date: Thu, 19 May 2011 22:56:11
From: <>
Subject: [ curl-Bugs-3304789 ] Binding to wrong MS CRT when building MS VC++
     with SP/hotfix

Bugs item #3304789, was opened at 2011-05-19 22:56

Submitted By: Didier LIROULET (dliroulet)
Summary: Binding to wrong MS CRT when building MS VC++ with SP/hotfix

Initial Comment:

We uses libcurl DLL in OCS Inventory NG, an open source inventory and deployement tool, and we build it using MS Visual C++ 2008 for use with our Windows agent (we are including MS CRT/MFC with our client, but not using vcredist_x86.exe).

All is fine if we build libcurl using MS VC++ 2008 RTM.

However, if we setup MS VC++ 2008 SP1 (or hotfixes) which update MS CRT version, the default makefile.vc9 does not bind libcurl DLL to the latest MS CRT installed on development computer.

In libcurl.dll.manifest file, binding to MS CRT is always 9.0.21022.8. Today, we currently have 9.0.30729.5570, and this produce error on computers where we install our client. All other DLL and exe uses version 9.0.30729.5570 of MS CRT, and only libcurl use version 9.0.21022.8. So we have to redistribute both release of CRT.

To allow binding to the lastest CRT installed on dev computer, you must use _BIND_TO_CURRENT_VCLIBS_VERSION preprocessor define (see for more explanation).

In libcurl makefile.vc9, you just have to add in the CFLAGS line 95 /D_BIND_TO_CURRENT_VCLIBS_VERSION and DLL will be automatically bind to the current CRT installed on dev computer.

If you can fix this for a future release, we will be very happy !

Thanks a lot for this wonderfull peace of software.



You can respond by visiting:
List admin:
Received on 2011-05-19