Recently we did some big architectural changes (i.e. mutlithreading support) to our cloud print module. Now I have to run a PreFast check on it, but because the current edition of Visual Studio 2008 that we are using does not have integrated PreFast check support, I have to do it through Windows DDK.
I am trying to build the source with WDK, but I am getting this error.
error LNK2005: "void _cdecl operator delete(void *)" (?3@YAXPAX@Z) already defined in libcmt.lib (delete.obj)
I believe that the linker used libcpmt.lib
at a prior stage and it had the same definition for delete method. The source also has c files and cpp files mixed at different module levels. Could this be the real reason why it is using both libcmp.lib
and libcpmt.lib
in the first place?
Is there anyway i can fix this? I don't really need a "right" way. All i want is to build the source, so that i can run PreFast check (not really concerned about link related warnings). If it gives any PreFast warning regarding this, i can skip it for the time being.