mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker': value '1' doesn't match value '0' in msvcrtd.lib

前端 未结 2 1922
情书的邮戳
情书的邮戳 2021-01-21 09:06

I have a C library project for UWP. There are some C files which are calling C++ WINRT functions defined in CPP file.It is compiling successfully and generating a library file(L

相关标签:
2条回答
  • 2021-01-21 09:21

    The standard /nodefaultlib did not work for me.

    The following linker flags (for debug) did the trick in my case:

    /defaultlib:'vccorlibd.lib' /defaultlib:'msvcrtd.lib'
    
    0 讨论(0)
  • 2021-01-21 09:23

    I had the same Issue and fixed it using the linker flags:

    /nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib
    

    for debug builds you can use:

    /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib
    
    0 讨论(0)
提交回复
热议问题