curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Windows compilation error

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 15 Jul 2019 01:21:33 -0400

On 7/7/2019 6:51 PM, MATSUDA Daiki wrote:
> On 2019年07月08日 07:17, Ray Satiro via curl-library wrote:
>> On 7/7/2019 5:43 PM, MATSUDA Daiki wrote:
>>> On 2019年07月07日 15:17, Ray Satiro via curl-library wrote:
>>>> On 7/2/2019 8:07 PM, MATSUDA Daiki via curl-library wrote:
>>>>> In my research, the curl library with /MD option in spite of static.
>>>>>
>>>>> https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=vs-2019
>>>>>
>>>>>
>>>>
>>>>
>>>> Is it possible that you want RTLIBCFG=static? [1] It is not the
>>>> recommended method.
>>>
>>> I know the option 'RTLBCFG'. But is there any meaning under the
>>> situation with mode=static and without RTLBCFG=static?
>>
>>
>> I'm sorry but I don't understand what you're asking. The difference is
>> described in the document that I referenced. Either you can build
>> libcurl as a static library or a DLL. When you are building libcurl it
>> needs a C runtime (almost invariably Microsoft's C runtime on Windows ms
>> crt). By default we use the CRT import library and so when you build
>> your app with static libcurl it should link to the CRT DLL.
>
> I pointed that when try to build other apps with other static library,
> libcurl static library without RTLIBCFG=static occurs compile error.
>
> e.g.
> https://stackoverflow.com/questions/5839362/why-do-i-get-lnk4098-conflicts-with-use-of-other-libs-when-trying-to-compile-c/5839453#5839453
>
>
> Is such a static library by default for useful?
>
> As I got the developer's aspect, I use RTLBCFG=static.

It's possible you have other libraries that were built to use the static
crt runtime. Typically static libraries reference the import crt library
for linking.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-07-15