Thanks for the tip. I found another way to fix it (I want to be able to use
CRT string routintes, etc.).
I'm building a new ATL/WTL project. When I compiled for release, I got
these errors.
Linking...
LIBCMT.lib(crt0dat.obj) : error LNK2005: __osplatform already defined in
atlmincrt.lib(atlinit.obj)
LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
referenced in function _mainCRTStartup
The problem switch was under Project Properties, Configuration Properties,
General: "Minimize CRT Use in ATL" was set to Yes. In debug mode, it was
set to No. In both cases, the option "Use of ATL" was set to "Not Using
ATL".
The funny thing is that the help text at the bottom of the window for
"Minimize CRT Use in ATL" reads:
"Tells ATL to link to the C runtime libraries statically to minimize
dependencies; requires that 'Use of ATL' be set."
So it was an invalid configuration in the first place and Developer Studio
didn't warn about it. This is doubly frustrating because it's the ATL/WTL
Application Wizard that configures it that way!
This is a tool that is unsupported my Microsoft. It was nice of them to
provide it, as it is nice in many ways (the library itself is great, albeit
lacking in documentation). However, even a modicum of testing would have
revealed this. They would have only needed to reference strcpy and build
release. Oh well, at least it's easy to fix.