cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Static build without LIBCMT

From: Sergei Nikulov <sergey.nikulov_at_gmail.com>
Date: Thu, 27 Aug 2015 18:31:00 +0300

2015-08-26 17:07 GMT+03:00 Miroslav Lazic <lazic13_at_gmail.com>:

> Adding libcmt on IgnoreDefaultLibs in my VS project is a workaround, but I
> would like to go that way it if I don't have to.
> Ok, but I would like to get libcurl linked against msvcrt, if it's
> possible, as that is how it is linked in the project.
>
>
Hello Miroslav,

As far as I understand you just need build static libcurl in debug mode.
With cmake it can be done in following way.
Create two folders within curl clone for ex."build.debug" and
"build.release"

in both folders call cmake
#cmake .. -DCMAKE_USE_OPENSSL=OFF -DCURL_STATICLIB=ON

then in build.debug
#cmake --build . --config Debug
this one should be built with Debug crt lib

in build.release
#cmake --build . --config Release
this one should be built with Release crt lib

Currently you've get both libcurl.lib with the same name in both folders.
I believe, we should fix cmake scripts to set prefix "SD" - for static
debug and "S" for static release.

Could you please check if this will work for you?
Thank you.

> --
>
>
> *Pozdrav,Miroslav Lazić*
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Best Regards,
Sergei Nikulov

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-27