Original Post
Is there anyway to specify which .obj file is used by the librarian to avoid the following error...
1>DEF.obj : warning LNK4006: "protected: __thiscall ####::CGraphics::CGraphics(struct HWND__ *)" (??0CGraphics@H####@@IAE@PAUHWND__@@@Z) already defined in ABC.obj; second definition ignored and allow this: #ifdef USE_ABC
#include "ABC.H"
#endif
#ifdef USE_DEF
#include "DEF.H"
#endif I'm trying to avoid one of the obvious solutions: #ifdef USE_ABC
#pragma comment(lib, "ABC.LIB")
#endif
#ifdef USE_DEF
#pragma comment(lib, "DEF.LIB")
#endif due to the structure of the project (the desire for a single .lib) Any thoughts? I know there are probably a dozen ways to tackle this problem, I just have not found a simple elegant solution yet.