I got the warning "LNK4098: defaultlib 'libcmt.lib' conflicts with ..." I just added /NODEFAULTLIB:libcmt.lib under the property page Linker\Command Line\Additional Options. The warning vanished and the program worked.