Here's my code:
#include <stdio.h>
int main(void) {
printf("Hello! \n");
return 0;
}
I call first cl /Fa test.c, then call ml test.asm and I get the errors:
LIBCMT.lib(default_local_stdio_options.obj) : error LNK2005: ___local_stdio_printf_options already defined in test.obj libvcruntime.lib(undname.obj) : error LNK2005: ___local_stdio_printf_options already defined in test.obj test.exe : fatal error LNK1169: one or more multiply defined symbols found
It works fine if I don't use printf. What am I doing wrong?