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

前端 未结 2 1924
情书的邮戳
情书的邮戳 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: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
    

提交回复
热议问题