How to make a Static lib with CString and a MFC App
I was having a problem trying to to make a Static lib with CString and a MFC App.
I looked through the forum and didn't find anything but, I did find an old app in my shop that had the answer:
Below is the stdafx from the lib. I think the VC_EXTRACLEAN may have something to do with it.
Also it is important that the MFC is used as a shared DLL otherwise, you get this is already defined in that errors.
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#using <mscorlib.dll>
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afx.h>
#include <afxwin.h>
#include <afxext.h>
Hope this helps someone else
Gary