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
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'
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