February 22nd, 2004, 12:29 PM
resolving MFC name conflicts
I have been coding a game engine for a while now, the core part of it is in a DLL file. I have started coding the editor for it, and I'm trying to use MFC. the problem is, I have classes named CObject, and CArchive. The first thing I tried to do to fix this is include MFC into a namespace, but I seriously doubted it would work:
// MFC includes here, just the classwizard generated ones
then use fully qualified MFC names for everything. but, surpise suprise, this didn't work. many hundreds of include file errors, lots of 'name' undefined (particularly time_t), and 'name' is not a member of 'Global namespace' (resulting from things like ::GetWindowTextA in the MFC headers).
I could put my engine in a namespace, but that would be a LOT of work (300 files +), so this is my last resort. what are my options here?
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!