For me what did the trick is ...
extern "C" { int _afxForceUSRDLL; }
Notice the single underline. Cheers.