cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
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: SourceForge.net <noreply_at_sourceforge.net>
To: noreply_at_sourceforge.net
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
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3304789&group_id=976

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

Initial Comment:
Hello,

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 http://blog.kalmbach-software.de/2009/05/27/deployment-of-vc2008-apps-without-installing-anything/ 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.

Regards

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3304789&group_id=976
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-19