I have two libraries A and B. Library B is my own library and I need "windows.h" in it. Also for some functions I need to use a third-party library A. A uses google logging library and here is the problem :
The first error was this :
Severity Code Description Project File Line Error C1189 #error: ERROR macro is defined. Define GLOG_NO_ABBREVIATED_SEVERITIES before including logging.h
I defined GLOG_NO_ABBREVIATED_SEVERITIES before "A.h", but after that strange linking errors appeared. I have tested all solutions suggested here but none of them works.
Is there any other ways to use glog in a project that uses "windows.h"?
EDIT :
The linker errors are :
error LNK2019: unresolved external symbol "__declspec(dllimport) public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(char)" (__imp_?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z) referenced in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,char>(class std::basic_ostream<char,struct std::char_traits<char> > &,struct std::_Fillobj<char> const &)" (??$?6DU?$char_traits@D@std@@D@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABU?$_Fillobj@D@0@@Z)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(class std::ios_base & (__cdecl*)(class std::ios_base &))" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z) referenced in function _getHtsLables
error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(double)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z) referenced in function "public: virtual void __thiscall AD3::FactorDense::Print(class std::basic_ostream<char,struct std::char_traits<char> > &)" (?Print@FactorDense@AD3@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
fatal error LNK1120: 3 unresolved externals
I have recompiled A after adding GLOG_NO_ABBREVIATED_SEVERITIES, but nothing changed. But the problem solved by reordering the inclusion of "A.h" and "windows.h". When I include "A.h" before "windows.h" no error appears!!! I can not understand what was the real cause of linker errors! – payman