Today I came back to a project that I hadn't worked on in a few months. I got latest from source control and tried to build, and the linker complained "Error 1 fatal error LNK1104: cannot open file 'secchk.lib' AudioControl AudioControl".
Now WTF? I knew this was working before. The error remindinded me vaguely of a previous problem I had, so I searched my blog and found this one. The problem that time was that I was building for PPC03 and the project for some reason had not added secchk.lib to my platform. THis time, however, I am building for a generic Windows CE device, and for some reason it *is* adding it. Well CE doesn't have this lib, and I don't want it. A quick scan through the project settings didn't turn up anything obvious, so I went with the more heavy-handed approach of adding the following to a common header file:
#pragma
comment(linker, "/nodefaultlib:secchk.lib")
#pragma comment(linker, "/nodefaultlib:ccrtrtti.lib")
Done and done. (the second is required because when you add the first and rebuild, the linker will then complain about not finding ccrtrtti.lib). No idea why I get the error (I'd love to know the root cause) but I don't have time to dig around. Fortunately the #pragma directive overrides whatever project settings you have, which can be handy at times.