Hi
Thanks for your reply
Answers to your questions are:
I tried to reorder header files but no success.
If i remove certain header files then i am getting lot of undeclared errors.
Somewhere in library code i have typedef CString
Yes I am using conditional compilation where ever required.
I am building lib and app with same version & project settings
here is my stdafx.h:
Code:
#pragma once
#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
#include "targetver.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
extern "C"
{
#include <..my header files>
#include <..my header files>
}
// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS
#ifndef _AFXDLL
#define _AFXDLL
#endif
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
To give u more clarity here is the cpp file where i am getting error
Code:
#pragma once
#include "stdafx.h"
#include "PDFTools.h"
#include <sstream>
#include <myheaderfiles>
#include <myheaderfiles> //This is header file which is giving error and which include the header file where CString is typedef.
#include <myheaderfiles>
#include <myheaderfiles>
#include <myheaderfiles>
#include <myheaderfiles>
#include <myheaderfiles>
#include <boost/program_options.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <limits>
#include <myheaderfiles>
#include <myheaderfiles>
#ifdef WIN32
#include <Windows.h>
#undef max
#undef min
#endif
using namespace std;
using namespace boost;
using namespace ...; This is namespace which is getting error
using namespace ...;
using namespace ...;
using namespace ...;
namespace ...;