cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Josue Andrade Gomes <josue.gomes.honeypot_at_gmail.com>
Date: Wed, 25 May 2011 12:14:23 -0300

This is a known issue with VS 2008 SP1. See
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/867cf808-bf1f-4f4a-bde1-cd75d92d73ad
and http://stackoverflow.com/questions/59635/app-does-not-run-with-vs-2008-sp1-dlls-previous-version-works-with-rtm-versions

The workaround is indeed define _BIND_TO_CURRENT_VCLIBS_VERSION to 1

josue
josuegomes.com

On Thu, May 19, 2011 at 6:29 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> 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

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-25