UNICODE build - but something's linking incorrectly
-
Hi, Got a bit of a perplexing problem. I'm building a Unicode DLL, which is linking to a lib I've built (also Unicode, obviously). If I build the DLL without referencing the lib, it builds perfectly. However, when I link in the lib, something in it is causing the non-Unicode MFC libraries (
nafxcwd
) to be linked in too, causing the error:LINK : warning LNK4098: defaultlib 'nafxcwd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
However, both DLL and lib are compiled with _UNICODE defined, and the lib's compiled with /NODEFAULTLIB, so I can't work out where the reference to the non-Unicode symbol is coming from. I've tried linking with /VERBOSE:LIB, but it doesn't seem to be giving any clues. The question is, how can I find out what symbol is causing the linker to search in thenafxcwd
library? Is there any linker option which will show me which symbol is being searched for when each library is being searched? Any other easy ways of solving this? Thanks Mark