Intel pin and chrono conflicts - c++
I try to measure the runtime of the program using Intel Pin. For this purpose I include chrono in my project. However It is not going to compile well. It gives a lot of errors. Furthermore, I tried to include chrono to many standart Intel Pin examples - the same result.
Could you please help me to solve errors below?
ratio(24,32): error C2143: syntax error: missing ',' before '<'
ratio(25): message : see reference to class template instantiation 'std::_Abs<_Val>' being compiled
ratio(30,38): error C2143: syntax error: missing ',' before '<'
ratio(31): message : see reference to class template instantiation 'std::_Safe_mult<_Ax,_Bx,_Sfinae,_Good>' being compiled
ratio(40,36): error C2143: syntax error: missing ',' before '<'
ratio(41): message : see reference to class template instantiation 'std::_Sign_of<_Val>' being compiled
ratio(45,38): error C2143: syntax error: missing ',' before '<'
ratio(46): message : see reference to class template instantiation 'std::_Safe_addX<_Ax,_Bx,_Good,_Also_good>' being compiled
ratio(50,44): error C2760: syntax error: unexpected token ',', expected 'expression'
ratio(51): message : see reference to class template instantiation 'std::_Safe_addX<_Ax,_Bx,false,false>' being compiled
ratio(65,41): error C2143: syntax error: missing ',' before '<'
ratio(66): message : see reference to class template instantiation 'std::_GcdX<_Ax,0>' being compiled
ratio(74,2): error C2504: 'integral_constant': base class undefined
ratio(74,38): error C2143: syntax error: missing ',' before '<'
ratio(158,5): error C2065: 'void_t': undeclared identifier
ratio(158,1): error C2226: syntax error: unexpected type 'std::_Ratio_multiply<_R1,_R2>::_Num::type'
ratio(159,1): error C2988: unrecognizable template declaration/definition
ratio(159,1): error C2059: syntax error: '>'
ratio(159,58): error C2143: syntax error: missing ';' before '{'
ratio(159,58): error C2447: '{': missing function header (old-style formal list?)
ratio(186,35): error C2143: syntax error: missing ',' before '<'
ratio(188): message : see reference to class template instantiation 'std::ratio_equal<_R1,_R2>' being compiled
ratio(195,39): error C2143: syntax error: missing ',' before '<'
ratio(197): message : see reference to class template instantiation 'std::ratio_not_equal<_R1,_R2>' being compiled
ratio(252,34): error C2143: syntax error: missing ',' before '<'
ratio(254): message : see reference to class template instantiation 'std::ratio_less<_R1,_R2>' being compiled
ratio(261,40): error C2143: syntax error: missing ',' before '<'
ratio(263): message : see reference to class template instantiation 'std::ratio_less_equal<_R1,_R2>' being compiled
ratio(279,43): error C2143: syntax error: missing ',' before '<'
ratio(282): message : see reference to class template instantiation 'std::ratio_greater_equal<_R1,_R2>' being compiled
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h(512,39): error C2371: 'wint_t': redefinition; different basic types
1>E:\Tools\source\pin\extras\crt\include\wchar.h(52): message : see declaration of 'wint_t'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h(513,39): error C2371: 'wctype_t': redefinition; different basic types
1>E:\Tools\source\pin\extras\crt\include\wchar.h(77): message : see declaration of 'wctype_t'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h(538,19): error C2371: 'mbstate_t': redefinition; different basic types
1>E:\Tools\source\pin\extras\crt\include\wchar.h(58): message : see declaration of 'mbstate_t'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h(552,28): error C2371: 'time_t': redefinition; different basic types
1>E:\Tools\source\pin\extras\crt\include\sys\types.h(91): message : see declaration of 'time_t'
vcruntime_new.h(34,26): error C2011: 'std::nothrow_t': 'struct' type redefinition
1>E:\Tools\source\pin\extras\libstdc++\include\new(10): message : see declaration of 'std::nothrow_t'
vcruntime_new.h(168,5): error C2084: function 'void *operator new(size_t,void *)' already has a body
1>E:\Tools\source\pin\extras\libstdc++\include\new(36): message : see previous definition of 'new'
vcruntime_new.h(174,5): error C2084: function 'void operator delete(void *,void *) throw()' already has a body
1>E:\Tools\source\pin\extras\libstdc++\include\new(40): message : see previous definition of 'delete'
vcruntime_new.h(184,5): error C2084: function 'void *operator new[](size_t,void *)' already has a body
1>E:\Tools\source\pin\extras\libstdc++\include\new(37): message : see previous definition of 'new[]'
vcruntime_new.h(190,5): error C2084: function 'void operator delete[](void *,void *) throw()' already has a body
1>E:\Tools\source\pin\extras\libstdc++\include\new(41): message : see previous definition of 'delete[]'
xtimec.h(28,15): error C2144: syntax error: 'int' should be preceded by ';'
xtimec.h(28,19): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
xtimec.h(30,15): error C2144: syntax error: 'long' should be preceded by ';'
xtimec.h(30,20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
xtimec.h(30,1): error C2086: 'int _CRTIMP2': redefinition
xtimec.h(28): message : see declaration of '_CRTIMP2'
xtimec.h(31,15): error C2144: syntax error: 'long' should be preceded by ';'
xtimec.h(31,20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
xtimec.h(31,1): error C2086: 'int _CRTIMP2': redefinition
xtimec.h(28): message : see declaration of '_CRTIMP2'
xtimec.h(32,15): error C2144: syntax error: '__int64' should be preceded by ';'
xtimec.h(32,25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
xtimec.h(32,1): error C2086: 'int _CRTIMP2': redefinition
xtimec.h(28): message : see declaration of '_CRTIMP2'
xtimec.h(36,15): error C2144: syntax error: '__int64' should be preceded by ';'
xtimec.h(36,25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
xtimec.h(36,1): error C2086: 'int _CRTIMP2': redefinition
xtimec.h(28): message : see declaration of '_CRTIMP2'
xtimec.h(37,15): error C2144: syntax error: '__int64' should be preceded by ';'
xtimec.h(37,25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
xtimec.h(37,1): error C2086: 'int _CRTIMP2': redefinition
xtimec.h(28): message : see declaration of '_CRTIMP2'
chrono(28,55): error C2143: syntax error: missing ',' before '<'
chrono(29): message : see reference to class template instantiation 'std::chrono::treat_as_floating_point<_Rep>' being compiled
chrono(96,43): error C2143: syntax error: missing ';' before '<'
chrono(171): message : see reference to class template instantiation 'std::chrono::duration<_Rep,_Period>' being compiled
chrono(96,1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
chrono(96,30): error C2126: 'std::chrono::duration<_Rep,_Period>::common_type_t' cannot be declared with 'constexpr' specifier
chrono(96,1): warning C4869: 'nodiscard' may only be applied to classes, enumerations, and functions
chrono(97,1): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
chrono(101,43): error C2143: syntax error: missing ';' before '<'
chrono(101,1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
chrono(101,30): error C2126: 'std::chrono::duration<_Rep,_Period>::common_type_t' cannot be declared with 'constexpr' specifier
chrono(101,1): warning C4869: 'nodiscard' may only be applied to classes, enumerations, and functions
chrono(102,1): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
chrono(223,24): error C2143: syntax error: missing ',' before '<'
chrono(224): message : see reference to class template instantiation 'std::_Lcm<_Ax,_Bx>' being compiled
chrono(228,19): error C2988: unrecognizable template declaration/definition
chrono(228,19): error C2143: syntax error: missing ';' before '<'
chrono(228,19): error C2059: syntax error: '<'
chrono(228,37): error C2065: '_Rep1': undeclared identifier
chrono(228,44): error C2065: '_Period1': undeclared identifier
chrono(228,28): error C2923: 'std::chrono::duration': '_Rep1' is not a valid template type argument for parameter '_Rep'
chrono(228,28): error C2923: 'std::chrono::duration': '_Period1' is not a valid template type argument for parameter '_Period'
chrono(229,22): error C2065: '_Rep2': undeclared identifier
chrono(229,29): error C2065: '_Period2': undeclared identifier
chrono(229,13): error C2923: 'std::chrono::duration': '_Rep2' is not a valid template type argument for parameter '_Rep'
chrono(229,13): error C2923: 'std::chrono::duration': '_Period2' is not a valid template type argument for parameter '_Period'
chrono(229,40): error C2143: syntax error: missing ';' before '{'
chrono(229,40): error C2447: '{': missing function header (old-style formal list?)
chrono(235,8): error C2976: 'std::common_type': too few template arguments
chrono(228): message : see declaration of 'std::common_type'
chrono(238,2): error C2976: 'std::common_type': too few template arguments
chrono(236): message : see declaration of 'std::common_type'
chrono(243,39): error C2988: unrecognizable template declaration/definition
chrono(243,39): error C2143: syntax error: missing ';' before '<'
chrono(243,16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
chrono(243,39): error C2059: syntax error: '<'
chrono(243,49): error C2065: '_Rep1': undeclared identifier
chrono(243,56): error C2065: '_Period1': undeclared identifier
chrono(243,40): error C2923: 'std::chrono::duration': '_Rep1' is not a valid template type argument for parameter '_Rep'
chrono(243,40): error C2923: 'std::chrono::duration': '_Period1' is not a valid template type argument for parameter '_Period'
chrono(243,76): error C2065: '_Rep2': undeclared identifier
chrono(243,83): error C2065: '_Period2': undeclared identifier
chrono(243,67): error C2923: 'std::chrono::duration': '_Rep2' is not a valid template type argument for parameter '_Rep'
chrono(243,67): error C2923: 'std::chrono::duration': '_Period2' is not a valid template type argument for parameter '_Period'
chrono(244,34): error C2065: '_Rep1': undeclared identifier
chrono(244,41): error C2065: '_Period1': undeclared identifier
chrono(244,25): error C2923: 'std::chrono::duration': '_Rep1' is not a valid template type argument for parameter '_Rep'
chrono(244,25): error C2923: 'std::chrono::duration': '_Period1' is not a valid template type argument for parameter '_Period'
chrono(244,74): error C2065: '_Rep2': undeclared identifier
chrono(244,81): error C2065: '_Period2': undeclared identifier
chrono(244,65): error C2923: 'std::chrono::duration': '_Rep2' is not a valid template type argument for parameter '_Rep'
chrono(244,65): error C2923: 'std::chrono::duration': '_Period2' is not a valid template type argument for parameter '_Period'
chrono(245,81): error C2143: syntax error: missing ';' before '{'
chrono(245,81): error C2447: '{': missing function header (old-style formal list?)
chrono(251,39): error C2988: unrecognizable template declaration/definition
chrono(251,39): error C2143: syntax error: missing ';' before '<'
chrono(251,16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
chrono(251,26): error C2374: 'std::chrono::common_type_t': redefinition; multiple initialization
chrono(243): message : see declaration of 'std::chrono::common_type_t'
chrono(251,39): error C2059: syntax error: '<'
chrono(251,49): error C2065: '_Rep1': undeclared identifier
chrono(251,56): error C2065: '_Period1': undeclared identifier
chrono(251,40): error C2923: 'std::chrono::duration': '_Rep1' is not a valid template type argument for parameter '_Rep'
chrono(251,40): error C2923: 'std::chrono::duration': '_Period1' is not a valid template type argument for parameter '_Period'
chrono(251,76): error C2065: '_Rep2': undeclared identifier
chrono(251,83): error C2065: '_Period2': undeclared identifier
chrono(251,67): error C2923: 'std::chrono::duration': '_Rep2' is not a valid template type argument for parameter '_Rep'
chrono(251,67): error C2923: 'std::chrono::duration': '_Period2' is not a valid template type argument for parameter '_Period'
chrono(252,34): error C2065: '_Rep1': undeclared identifier
chrono(252,41): error C2065: '_Period1': undeclared identifier
chrono(252,25): error C2923: 'std::chrono::duration': '_Rep1' is not a valid template type argument for parameter '_Rep'
chrono(252,25): error C2923: 'std::chrono::duration': '_Period1' is not a valid template type argument for parameter '_Period'
chrono(252,74): error C2065: '_Rep2': undeclared identifier
chrono(252,81): error C2065: '_Period2': undeclared identifier
chrono(252,1): fatal error C1003: error count exceeds 100; stopping compilation
Related
Error while creating .tlh and .tli file using #import from MSOUTL.OLB in VC++ program
I want to create .thl and .tli file of MSOUTL.OLB file as I want to use the resulted .thl and .tli file in my C++ project using #include statement. For that I am using below line of code and it throws error as described in below. Any idea why it's happening? #import "C:\\Program Files\\Microsoft Office\\root\\Office16\\MSOUTL.OLB" rename("CopyFile", "OlkCopyFile") named_guids When I compile it. It throws below errors 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6767): error C3646: 'Assistant': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6767): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6777): error C3646: 'Assistance': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6777): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6781): error C3646: 'COMAddIns': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6781): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6783): error C3646: 'PickerDialog': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6783): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6789): error C3646: 'LanguageSettings': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6789): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6797): error C3646: 'AnswerWizard': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6797): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6801): error C3646: 'MsoDebugOptions': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6801): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6805): error C3646: 'DataPrivacyOptions': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6805): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6815): error C3646: 'GetAssistant': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6815): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6815): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6830): error C3646: 'GetCOMAddIns': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6830): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6830): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6833): error C3646: 'GetLanguageSettings': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6833): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6833): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6835): error C3646: 'GetAnswerWizard': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6835): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6835): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6858): error C3646: 'GetAssistance': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6858): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6858): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6860): error C3646: 'GetPickerDialog': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6860): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6860): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6863): error C3646: 'GetMsoDebugOptions': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6863): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6863): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6864): error C3646: 'GetDataPrivacyOptions': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6864): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6864): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7087): error C3646: 'CreateContactCard': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7087): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7088): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7971): error C3646: 'CommandBars': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(7971): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(8009): error C3646: 'GetCommandBars': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(8009): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(8009): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18001): error C3646: 'CommandBars': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18001): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18057): error C3646: 'GetCommandBars': unknown override specifier 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18057): error C2059: syntax error: '(' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(18057): error C2238: unexpected token(s) preceding ';' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21638): error C2556: 'Outlook::AddressEntryPtr Outlook::_AppointmentItem::GetOrganizer(void)': overloaded function differs only by return type from '_bstr_t Outlook::_AppointmentItem::GetOrganizer(void)' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21638): error C2371: 'Outlook::_AppointmentItem::GetOrganizer': redefinition; different basic types 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C2039: 'GetAssistant': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C2497: 'AssistantPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28929): error C2146: syntax error: missing ';' before identifier 'GetAssistant' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C2039: 'GetCOMAddIns': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C2497: 'COMAddInsPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28939): error C2146: syntax error: missing ';' before identifier 'GetCOMAddIns' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C2039: 'GetLanguageSettings': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C2497: 'LanguageSettingsPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28942): error C2146: syntax error: missing ';' before identifier 'GetLanguageSettings' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C2039: 'GetAnswerWizard': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C2497: 'AnswerWizardPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28944): error C2146: syntax error: missing ';' before identifier 'GetAnswerWizard' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C2039: 'GetAssistance': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C2497: 'IAssistancePtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28956): error C2146: syntax error: missing ';' before identifier 'GetAssistance' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C2039: 'GetPickerDialog': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C2497: 'PickerDialogPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28958): error C2146: syntax error: missing ';' before identifier 'GetPickerDialog' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C2039: 'GetMsoDebugOptions': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C2497: 'MsoDebugOptionsPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28960): error C2146: syntax error: missing ';' before identifier 'GetMsoDebugOptions' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C2039: 'GetDataPrivacyOptions': is not a member of 'Outlook::_Application' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6756): note: see declaration of 'Outlook::_Application' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C2497: 'DataPrivacyOptionsPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(28961): error C2146: syntax error: missing ';' before identifier 'GetDataPrivacyOptions' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C2039: 'CreateContactCard': is not a member of 'Outlook::_NameSpace' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(6960): note: see declaration of 'Outlook::_NameSpace' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C2497: 'ContactCardPtr': 'implementation_key' can only be applied to function declarations 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29006): error C2146: syntax error: missing ';' before identifier 'CreateContactCard' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(29137): error C2039: 'GetCommandBars': is not a member of 'Outlook::_Inspector' 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer' 1>c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(31671): error C2371: 'Outlook::_AppointmentItem::GetOrganizer': redefinition; different basic types 1> c:\temp\testunicode\testunicode\x64\release\msoutl.tlh(21536): note: see declaration of 'Outlook::_AppointmentItem::GetOrganizer' Any help, how to fix this? Do i need to add any reference or any compiler option?
With a hat-tip to #Simon Mourier, you need to import a dependency first: #import "C:\Program Files\Microsoft Office\Root\VFS\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\MSO.dll" \ rename("RGB","RGB_mso") rename("DocumentProperties","DocumentProperties_mso") \ no_function_mapping using namespace Office; #import "C:\\Program Files\\Microsoft Office\\root\\Office16\\MSOUTL.OLB" \ rename("GetOrganizer", "GetOrganizer_msoutl") rename("CopyFile","CopyFile_msoutl") rename ("PlaySound","PlaySound_msoutl") \ no_function_mapping I've renamed all the functions that gave a duplicate warning on my compiler (VS Community 2019) and my versions of the type libraries. I've also added the (undocumented) no_function_mapping qualifier, as the function mapping for large type libraries such as these (a somewhat legacy feature for older compilers according to MS) can cause rare issues: See SO answer here.
Using variadic template by lambda capture and pass to function's argument
template<typename FN_, typename ... Arguments> SuspendThread(FN_&& func, Arguments&& ... args) { auto fut_suspend = Psuspend.get_future(); std::thread it( [fut = std::move(fut_suspend), func, args ...]() { fut.wait(); func(std::forward<Arguments>(args)...); }); task.swap(it); } I use VS 2015 RC. Now I'm making just simple things. I want to make func to use args but while template instantiation it's get error. Am I wrong to use variadic template with lambda? Here is full error: 1>PATH\suspendthread.hpp(29): error C2337: 'fut': attribute not found 1>PATH\main.cpp(6): note: see reference to function template instantiation 'SuspendThread::SuspendThread<main::<lambda_380b530b324058b12b3b95b6ff957dd6>,int,int>(FN_ &&,int &&,int &&)' being compiled 1 with 1 [ 1 FN_=main::<lambda_380b530b324058b12b3b95b6ff957dd61 ] 1>PATH\suspendthread.hpp(29): error C2337: 'move': attribute not found 1>PATH\suspendthread.hpp(29): error C2337: 'func': attribute not found 1>PATH\suspendthread.hpp(29): error C2337: 'args': attribute not found 1>PATH\suspendthread.hpp(29): error C2143: syntax error: missing ']' before '...' 1>PATH\suspendthread.hpp(29): error C2143: syntax error: missing ')' before ']' 1>PATH\suspendthread.hpp(29): error C2143: syntax error: missing ';' before ']' 1>PATH\suspendthread.hpp(29): error C2059: syntax error: ']' 1>PATH\suspendthread.hpp(29): error C2143: syntax error: missing ';' before '{' 1>PATH\suspendthread.hpp(31): error C2065: 'fut': undeclared identifier 1>PATH\suspendthread.hpp(31): error C2228: left of '.wait' must have class/struct/union 1>PATH\suspendthread.hpp(31): note: type is 'unknown-type' 1>PATH\suspendthread.hpp(33): error C2059: syntax error: ')' 1>PATH\suspendthread.hpp(34): error C2664: 'void std::thread::swap(std::thread &) noexcept': cannot convert argument 1 from 'std::thread (__cdecl *)(...)' to 'std::thread &'
Compile Error Visual studio 2013
Hi I have problems with compiling this code. I got an error and I don't know how to fix it. I searched on Google but I found nothing. player.h : http://wklej.org/id/1639093/ player.cpp http://wklej.org/id/1639094/ 1>------ Build started: Project: tibiafun, Configuration: Release Win32 ------ 1> player.cpp 1> Unknown compiler version - please run the configure tests and report the results 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\definitions.h(25): warning C4005: 'EWOULDBLOCK' : macro redefinition 1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\errno.h(132) : see previous definition of 'EWOULDBLOCK' 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\fileloader.h(269): warning C4018: '<' : signed/unsigned mismatch 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\creature.h(294): warning C4101: 'vipstatus' : unreferenced local variable 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\player.h(545): error C2146: syntax error : missing ';' before identifier 'editedHouseRights' 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\player.h(545): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\player.h(547): error C2061: syntax error : identifier 'rights_t' 1>c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\player.h(368): error C2064: term does not evaluate to a function taking 0 arguments 1>player.cpp(125): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(125): error C2065: 'HOUSE_NONE' : undeclared identifier 1>player.cpp(278): error C2109: subscript requires array or pointer type 1>player.cpp(299): error C2109: subscript requires array or pointer type 1>player.cpp(303): error C2181: illegal else without matching if 1>player.cpp(309): error C2059: syntax error : 'switch' 1>player.cpp(310): error C2143: syntax error : missing ';' before '{' 1>player.cpp(310): error C2447: '{' : missing function header (old-style formal list?) 1>player.cpp(325): error C2059: syntax error : 'if' 1>player.cpp(326): error C2143: syntax error : missing ';' before '{' 1>player.cpp(326): error C2447: '{' : missing function header (old-style formal list?) 1>player.cpp(354): error C2143: syntax error : missing ';' before '<<' 1>player.cpp(354): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>player.cpp(354): error C2059: syntax error : 'string' 1>player.cpp(354): error C2059: syntax error : ')' 1>player.cpp(354): error C2365: 'exit' : redefinition; previous definition was 'function' 1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdlib.h(376) : see declaration of 'exit' 1>player.cpp(357): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>player.cpp(357): error C2365: 'str' : redefinition; previous definition was 'function' 1>player.cpp(357): error C2228: left of '.str' must have class/struct/union 1> type is 'int' 1>player.cpp(358): error C2059: syntax error : 'return' 1>player.cpp(359): error C2059: syntax error : '}' 1>player.cpp(359): error C2143: syntax error : missing ';' before '}' 1>player.cpp(362): error C2143: syntax error : missing ';' before '{' 1>player.cpp(362): error C2447: '{' : missing function header (old-style formal list?) 1>player.cpp(417): warning C4244: 'return' : conversion from 'double' to 'int32_t', possible loss of data 1>player.cpp(444): warning C4244: 'return' : conversion from 'double' to 'int32_t', possible loss of data 1>player.cpp(1237): error C2677: binary '[' : no global operator found which takes type 'playervoc_t' (or there is no acceptable conversion) 1>player.cpp(1237): error C2109: subscript requires array or pointer type 1>player.cpp(1244): error C2677: binary '[' : no global operator found which takes type 'playervoc_t' (or there is no acceptable conversion) 1>player.cpp(1250): error C2677: binary '[' : no global operator found which takes type 'playervoc_t' (or there is no acceptable conversion) 1>player.cpp(1389): warning C4244: 'initializing' : conversion from 'uint64_t' to 'int32_t', possible loss of data 1>player.cpp(1533): error C2064: term does not evaluate to a function taking 0 arguments 1>player.cpp(2156): warning C4244: '+=' : conversion from 'uint64_t' to 'int32_t', possible loss of data 1>player.cpp(2161): warning C4244: '-=' : conversion from 'uint64_t' to 'int32_t', possible loss of data 1>player.cpp(2180): error C2109: subscript requires array or pointer type 1>player.cpp(2181): error C2109: subscript requires array or pointer type 1>player.cpp(2182): error C2109: subscript requires array or pointer type 1>player.cpp(2183): error C2109: subscript requires array or pointer type 1>player.cpp(2184): error C2109: subscript requires array or pointer type 1>player.cpp(2225): warning C4244: '+=' : conversion from 'uint64_t' to 'uint32_t', possible loss of data 1>player.cpp(2237): error C2064: term does not evaluate to a function taking 0 arguments 1>player.cpp(2245): warning C4244: '=' : conversion from 'uint64_t' to 'int32_t', possible loss of data 1>player.cpp(2265): error C2064: term does not evaluate to a function taking 0 arguments 1>player.cpp(2335): error C2109: subscript requires array or pointer type 1>player.cpp(2340): error C2109: subscript requires array or pointer type 1>player.cpp(2345): error C2109: subscript requires array or pointer type 1>player.cpp(2878): error C2061: syntax error : identifier 'rights_t' 1>player.cpp(2885): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(2885): error C2065: 'rights' : undeclared identifier 1>player.cpp(2888): error C2065: 'rights' : undeclared identifier 1>player.cpp(2888): error C2065: 'HOUSE_OWNER' : undeclared identifier 1>player.cpp(2889): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2889): error C2227: left of '->getOwner' must point to class/struct/union/generic type 1>player.cpp(2894): error C2065: 'rights' : undeclared identifier 1>player.cpp(2894): error C2065: 'HOUSE_SUBOWNER' : undeclared identifier 1>player.cpp(2895): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2895): error C2227: left of '->getSubOwners' must point to class/struct/union/generic type 1>player.cpp(2896): error C2065: 'rights' : undeclared identifier 1>player.cpp(2896): error C2065: 'HOUSE_DOOROWNER' : undeclared identifier 1>player.cpp(2897): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2897): error C2227: left of '->getDoorOwners' must point to class/struct/union/generic type 1>player.cpp(2898): error C2065: 'rights' : undeclared identifier 1>player.cpp(2898): error C2065: 'HOUSE_GUEST' : undeclared identifier 1>player.cpp(2899): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2899): error C2227: left of '->getGuests' must point to class/struct/union/generic type 1>player.cpp(2913): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(2913): error C2065: 'HOUSE_GUEST' : undeclared identifier 1>player.cpp(2915): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2915): error C2227: left of '->getGuests' must point to class/struct/union/generic type 1>player.cpp(2916): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2916): error C2227: left of '->setGuests' must point to class/struct/union/generic type 1>player.cpp(2925): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(2925): error C2065: 'HOUSE_DOOROWNER' : undeclared identifier 1>player.cpp(2927): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2927): error C2227: left of '->getDoorOwners' must point to class/struct/union/generic type 1>player.cpp(2928): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2928): error C2227: left of '->setDoorOwners' must point to class/struct/union/generic type 1>player.cpp(2930): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(2930): error C2065: 'HOUSE_SUBOWNER' : undeclared identifier 1>player.cpp(2932): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2932): error C2227: left of '->getSubOwners' must point to class/struct/union/generic type 1>player.cpp(2933): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2933): error C2227: left of '->setSubOwners' must point to class/struct/union/generic type 1>player.cpp(2935): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(2935): error C2065: 'HOUSE_OWNER' : undeclared identifier 1>player.cpp(2937): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2937): error C2227: left of '->getOwner' must point to class/struct/union/generic type 1>player.cpp(2938): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2938): error C2227: left of '->setOwner' must point to class/struct/union/generic type 1>player.cpp(2955): error C2039: 'getHouse' : is not a member of 'Tile' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(19) : see declaration of 'Tile' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(19) : see declaration of 'Tile' 1>player.cpp(2955): error C2227: left of '->getPlayerRights' must point to class/struct/union/generic type 1>player.cpp(2955): error C2065: 'HOUSE_NONE' : undeclared identifier 1>player.cpp(2956): error C2039: 'getHouse' : is not a member of 'Tile' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(19) : see declaration of 'Tile' 1>player.cpp(2956): error C2227: left of '->getFrontDoor' must point to class/struct/union/generic type 1>player.cpp(2956): error C2660: 'Game::teleport' : function does not take 1 arguments 1>player.cpp(2964): error C2039: 'getHouse' : is not a member of 'Tile' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(19) : see declaration of 'Tile' 1>player.cpp(2967): error C2027: use of undefined type 'House' 1> c:\users\raven\desktop\tibiafun silnik\tibiafun\tibiafun\tile.h(12) : see declaration of 'House' 1>player.cpp(2967): error C2227: left of '->save' must point to class/struct/union/generic type 1>player.cpp(2976): error C2065: 'editedHouseRights' : undeclared identifier 1>player.cpp(2976): error C2065: 'HOUSE_NONE' : undeclared identifier 1>player.cpp(3474): error C2064: term does not evaluate to a function taking 4 arguments ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== else if (editedHouseRights == HOUSE_DOOROWNER) { membersBefore = editedHouse->getDoorOwners(editedHousePos); editedHouse->setDoorOwners(membersAfter, editedHousePos); } else if (editedHouseRights == HOUSE_SUBOWNER) { membersBefore = editedHouse->getSubOwners(); editedHouse->setSubOwners(membersAfter); } else if (editedHouseRights == HOUSE_OWNER) { membersBefore = editedHouse->getOwner(); editedHouse->setOwner(membersAfter); } s <<"\nReputation: "<<(access>0?"+":"")<<access<<"\n";exit(1); s <<"\nReputation: "<<(access>0?"+":"")<<access<<"\n";exit(1); #endif //_BDD_REPUTACJA_ str = s.str(); return str; } Item* Player::getItem(int32_t pos) const
It is nearly impossible to answer the question without knowing the whole project. I guess you downloaded from somewhere. The error you are facing is a symptom not the cause. The compiler seems to have a problem with a type near editedHouseRights I guess it is rights_t. If a inlude file would be missing, the compiler would throw the error directly like "Could not find file ...." but in this case it didn't. With that knowledge there can only be three errors be left. You are missing a library the project expect to be in place. Read the installation manual. You may missing something. The code uses #ifdef switches. Maybe you forgot to set a right #define. That should also be found in a documentation. Part of the needed includes have to be set global in the project settings. Read the manual for that. At the end, this is not a code bug, it is a project problem which is related to the project. Ask someone from the project.
EnterCriticalSection identifier not found
Ok, I'm compiling a project that is using the Chromium Embedded Framework 3. I'm using Windows 7 64-bit with Visual Studio 2013 RC. Officially, VS2013 RC is not supported by CEF3. However, I require VS2013 due to C++11 features that are only available in VS2013. I downloaded the CEF3 64 bit binaries, and compiled their sample application using VS2013. It worked beautifully (although I had to add the <algorithm> header file to some of the cef3 header files). Now, when I include some of the CEF3 files into my project, I'm getting a bunch of compile errors. I'm using SCons to compile my project. It looks almost like some variables and defines are not getting set/called when the CEF3 header file(s) include the <windows.h> header file... The errors are: scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... cl /Fobuild\gui\GUI.obj /c src\gui\GUI.cpp /TP /w /wd4350 /EHsc /MD /DDEBUG /DPACKAGE_VERSION=\"0.0.1\" /DPACKAGE_BUGREPORT=\"https://github.com/jarrettchisholm/glr/issues\" /DBOOST_SPIRIT_USE_PHOENIX_V3 cl /Fobuild\gui\HtmlGuiComponent.obj /c src\gui\HtmlGuiComponent.cpp /TP /w /wd4350 /EHsc /MD /DDEBUG /DPACKAGE_VERSION=\"0.0.1\" /DPACKAGE_BUGREPORT=\"https://github.com/jarrettchisholm/glr/issues\" /DBOOST_SPIRIT_USE_PHOENIX_V3 GUI.cpp HtmlGuiComponent.cpp cl /Fobuild\models\ModelManager.obj /c src\models\ModelManager.cpp /TP /w /wd4350 /EHsc /MD /DDEBUG /DPACKAGE_VERSION=\"0.0.1\" /DPACKAGE_BUGREPORT=\"https://github.com/jarrettchisholm/glr/issues\" /DBOOST_SPIRIT_USE_PHOENIX_V3 ModelManager.cpp cl /Fobuild\glw\Animation.obj /c src\glw\Animation.cpp /TP /w /wd4350 /EHsc /MD /DDEBUG /DPACKAGE_VERSION=\"0.0.1\" /DPACKAGE_BUGREPORT=\"https://github.com/jarrettchisholm/glr/issues\" /DBOOST_SPIRIT_USE_PHOENIX_V3 Animation.cpp C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(55) : error C2146: syntax error : missing ';' before identifier 'instance' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(70) : error C2146: syntax error : missing ';' before identifier 'parent_window' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(71) : error C2146: syntax error : missing ';' before identifier 'menu' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(71) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(86) : error C2146: syntax error : missing ';' before identifier 'window' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(86) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types.h(83) : error C2371: 'char16' : redefinition; different basic types C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_string_types.h(51) : see declaration of 'char16' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(65) : error C2146: syntax error : missing ';' before identifier 'm_sec' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(52) : error C2065: 'm_sec' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(52) : error C2065: 'CRITICAL_SECTION' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(52) : error C2070: 'unknown-type': illegal sizeof operand C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(53) : error C2065: 'm_sec' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(53) : error C3861: 'InitializeCriticalSection': identifier not found C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(56) : error C2065: 'm_sec' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(56) : error C3861: 'DeleteCriticalSection': identifier not found C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(59) : error C2065: 'm_sec' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(59) : error C3861: 'EnterCriticalSection': identifier not found C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(62) : error C2065: 'm_sec' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(62) : error C3861: 'LeaveCriticalSection': identifier not found C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(84) : error C2039: 'instance' : is not a member of '_cef_main_args_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(54) : see declaration of '_cef_main_args_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(54) : see declaration of '_cef_main_args_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(96) : error C2061: syntax error : identifier 'HINSTANCE' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(96) : error C2535: 'CefMainArgs::CefMainArgs(void)' : member function already defined or declared C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(93) : see declaration of 'CefMainArgs::CefMainArgs' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(97) : error C2065: 'instance' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(97) : error C2065: 'hInstance' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(120) : error C2039: 'parent_window' : is not a member of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(61) : see declaration of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(61) : see declaration of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(121) : error C2039: 'menu' : is not a member of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(61) : see declaration of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(61) : see declaration of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(122) : error C2039: 'window' : is not a member of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(61) : see declaration of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_types_win.h(61) : see declaration of '_cef_window_info_t' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(139) : error C2061: syntax error : identifier 'HWND' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(149) : error C2061: syntax error : identifier 'HWND' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(165) : error C2061: syntax error : identifier 'HWND' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(140) : error C2065: 'WS_CHILD' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(140) : error C2065: 'WS_CLIPCHILDREN' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(140) : error C2065: 'WS_CLIPSIBLINGS' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(140) : error C2065: 'WS_TABSTOP' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(141) : error C2065: 'WS_VISIBLE' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(142) : error C2065: 'parent_window' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(142) : error C2065: 'hWndParent' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(143) : error C2065: 'windowRect' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(143) : error C2228: left of '.left' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(144) : error C2065: 'windowRect' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(144) : error C2228: left of '.top' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(145) : error C2065: 'windowRect' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(145) : error C2228: left of '.right' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(145) : error C2228: left of '.left' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(146) : error C2065: 'windowRect' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(146) : error C2228: left of '.bottom' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(146) : error C2228: left of '.top' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(150) : error C2065: 'WS_OVERLAPPEDWINDOW' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(150) : error C2065: 'WS_CLIPCHILDREN' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(150) : error C2065: 'WS_CLIPSIBLINGS' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(151) : error C2065: 'WS_VISIBLE' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(152) : error C2065: 'parent_window' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(152) : error C2065: 'hWndParent' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(153) : error C2065: 'CW_USEDEFAULT' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(154) : error C2065: 'CW_USEDEFAULT' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(155) : error C2065: 'CW_USEDEFAULT' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(156) : error C2065: 'CW_USEDEFAULT' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(158) : error C2065: 'windowName' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(158) : error C2228: left of '.c_str' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(158) : error C2228: left of '.length' must have class/struct/union type is 'unknown-type' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(158) : error C2660: 'cef_string_utf16_set' : function does not take 3 arguments C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(167) : error C2065: 'parent_window' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(167) : error C2065: 'hWndParent' : undeclared identifier C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_base.h(98) : error C3861: 'InterlockedIncrement': identifier not found C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_base.h(105) : error C3861: 'InterlockedDecrement': identifier not found C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(287) : error C2146: syntax error : missing ';' before identifier 'GetWindowHandle' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(287) : error C2433: 'CefBrowserHost::HWND' : 'virtual' not permitted on data declarations C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(287) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(295) : error C2146: syntax error : missing ';' before identifier 'GetOpenerWindowHandle' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(295) : error C2433: 'CefBrowserHost::HWND' : 'virtual' not permitted on data declarations C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(295) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(468) : error C2061: syntax error : identifier 'MSG' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(474) : error C2061: syntax error : identifier 'MSG' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(287) : error C2253: 'CefBrowserHost::GetWindowHandle' : pure specifier or abstract override specifier only allowed on virtual function C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_browser.h(295) : error C2253: 'CefBrowserHost::GetOpenerWindowHandle' : pure specifier or abstract override specifier only allowed on virtual function C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_keyboard_handler.h(59) : error C2061: syntax error : identifier 'MSG' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_keyboard_handler.h(71) : error C2061: syntax error : identifier 'MSG' C:\Users\Jarrett\projects\cef_binary_3.1547.1412_windows64\include/cef_render_handler.h(129) : error C2061: syntax error : identifier 'HCURSOR' src\gui\HtmlGuiComponent.cpp(179) : error C2082: redefinition of formal parameter 'clickCount' scons: building terminated because of errors. Some errors that jump out at me are: \cef_binary_3.1547.1412_windows64\include/internal/cef_win.h(59) : error C3861: 'EnterCriticalSection': identifier not found But this should be found, as cef_win.h clearly includes <windows.h> before it tries to call EnterCriticalSection. There are various other errors that seem like they shouldn't be occuring. I created a simple little sample file, which includes that same CEF3 header files that my project uses, and compiled using SCons, and it compiled just fine. The sample app is below: /* Sample C/C++, Windows, link to kernel32.dll */ #include <cef_app.h> #include <cef_client.h> #include <cef_render_handler.h> static CRITICAL_SECTION cs; /* This is the critical section object -- once initialized, it cannot be moved in memory */ /* If you program in OOP, declare this as a non-static member in your class */ void f() { /* Enter the critical section -- other threads are locked out */ EnterCriticalSection(&cs); /* Do some thread-safe processing! */ /* Leave the critical section -- other threads can now EnterCriticalSection() */ LeaveCriticalSection(&cs); } int main() { /* Initialize the critical section before entering multi-threaded context. */ InitializeCriticalSection(&cs); f(); /* Release system object when all finished -- usually at the end of the cleanup code */ DeleteCriticalSection(&cs); return 0; } Anyone have any ideas why I would be getting these errors?
as per comments: windows.h file wasn't included, because other script defined _WINDOWS_
C2653: 'GUI' : is not a class or namespace
Seriously getting on my nerves. This code was working just fine earlier, I restarted the IDE (Visual Studio 2010) and now suddenly the code goes bonkers on me. The error log is huge, and I have no idea what's causing it as the code seems to be pretty much correct. 1>ClCompile: 1> uicont.cpp 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C2653: 'GUI' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C2143: syntax error : missing ';' before '*' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Many more, but I assume this is what's causing the error. Here is the source code for the files that are having the most problems. Mage/GUI/UIContext.h #include <OGRE/OgreString.h> #include <OGRE/OgreOverlay.h> #include <OGRE/OgreOverlayManager.h> #include <vector> #include <Mage/GUI/Frame.h> #ifndef __H_MAGE_UICONTEXT #define __H_MAGE_UICONTEXT namespace Mage { class UIContext { public: UIContext(); ~UIContext(); GUI::Frame* createFrame(Ogre::String, Ogre::Vector2, double, double); void attachFrame(Ogre::OverlayContainer*); private: Ogre::Overlay* m_Overlay; std::vector<GUI::Frame*> m_Frames; }; } #endif // __H_MAGE_UICONTEXT Mage/GUI/Frame.h #include <OGRE/OgreVector2.h> #include <OGRE/OgreOverlayContainer.h> #include <OGRE/OgreOverlayManager.h> #include <OGRE/OgreString.h> #include <Mage/GUI/UIContext.h> #ifndef __H_MAGE_GUI_FRAME #define __H_MAGE_GUI_FRAME namespace Mage { namespace GUI { class Frame { public: Frame(Mage::UIContext*, Ogre::String, Ogre::Vector2, double, double); private: Ogre::OverlayContainer* m_Panel; }; } } #endif // __H_MAGE_GUI_FRAME I also included the WHOLE error log, but that just seems to be everything going down the gutter as this part fails. I haven't even touched that code and it has always compiled fine. Would it be needed to solve the problem, I'll include that as well; those are huge files though. 1>------ Build started: Project: Mage3D, Configuration: Debug Win32 ------ 1>Build started 17/08/2012 19:43:22. 1>InitializeBuildStatus: 1> Touching "Debug\Mage3D.unsuccessfulbuild". 1>ClCompile: 1> uicont.cpp 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C2653: 'GUI' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C2143: syntax error : missing ';' before '*' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): warning C4183: 'createFrame': missing return type; assumed to be a member function returning 'int' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(26): error C2653: 'GUI' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(26): error C2065: 'Frame' : undeclared identifier 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(26): error C2059: syntax error : '>' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(27): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(28): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(14): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(15): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(16): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2143: syntax error : missing ',' before ')' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(23): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(24): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(25): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(16): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(18): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(19): error C2039: 'UIController' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(19): error C2065: 'UIController' : undeclared identifier 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(19): error C2990: 'Ogre::Singleton' : non-class template has already been declared as a class template 1> c:\users\jesse\documents\visual studio 2010\projects\mage3d\ogre3d\include\ogre\ogresingleton.h(65) : see declaration of 'Ogre::Singleton' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(22): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(23): error C3413: 'Mage::UIContext::UIController' : invalid explicit instantiation 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(37): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontroller.h(38): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(4): error C2039: 'UIController' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(4): error C2039: 'UIController' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(4): error C2065: 'UIController' : undeclared identifier 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(4): error C2955: 'Ogre::Singleton' : use of class template requires template argument list 1> c:\users\jesse\documents\visual studio 2010\projects\mage3d\ogre3d\include\ogre\ogresingleton.h(65) : see declaration of 'Ogre::Singleton' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(6): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(7): error C2653: 'UIController' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(7): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(10): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(12): error C2653: 'UIController' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(12): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(13): error C2143: syntax error : missing ',' before ')' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(15): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(17): error C2653: 'UIController' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(17): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(19): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(21): error C2653: 'UIController' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(21): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(24): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(26): error C2653: 'UIController' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(26): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(37): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(39): error C2653: 'UIController' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(39): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(55): error C2143: syntax error : missing ',' before ')' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(67): error C2143: syntax error : missing ',' before ')' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(73): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(74): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(75): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\uicont.cpp(75): fatal error C1004: unexpected end-of-file found 1> luagui.cpp 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2039: 'UIContext' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2039: 'UIContext' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2061: syntax error : identifier 'UIContext' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\luagui.cpp(76): warning C4244: 'argument' : conversion from 'lua_Number' to 'const Ogre::Real', possible loss of data 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\luagui.cpp(76): warning C4244: 'argument' : conversion from 'lua_Number' to 'const Ogre::Real', possible loss of data 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\luagui.cpp(77): error C2661: 'Mage::GUI::Frame::Frame' : no overloaded function takes 4 arguments 1> frame.cpp 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2039: 'UIContext' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2039: 'UIContext' : is not a member of 'Mage' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2061: syntax error : identifier 'UIContext' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\gui\frame.cpp(4): error C2511: 'Mage::GUI::Frame::Frame(Mage::UIContext *,Ogre::String,Ogre::Vector2,double,double)' : overloaded member function not found in 'Mage::GUI::Frame' 1> c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(16) : see declaration of 'Mage::GUI::Frame' 1> context.cpp 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C2653: 'GUI' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C2143: syntax error : missing ';' before '*' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(21): warning C4183: 'createFrame': missing return type; assumed to be a member function returning 'int' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(26): error C2653: 'GUI' : is not a class or namespace name 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(26): error C2065: 'Frame' : undeclared identifier 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(26): error C2059: syntax error : '>' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(27): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\uicontext.h(28): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(14): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(15): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(16): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(18): error C2143: syntax error : missing ',' before ')' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(23): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(24): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\mage3d\include\mage\gui\frame.h(25): error C2143: syntax error : missing ';' before '}' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\ogre3d\include\ogre\ogrepixelformat.h(34): error C2143: syntax error : missing ';' before '{' 1>c:\users\jesse\documents\visual studio 2010\projects\mage3d\ogre3d\include\ogre\ogrepixelformat.h(43): error C2143: syntax error : missing ';' before '{' ... snip, just more of these errors ... 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:11.44 ========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ========== Well I don't know anymore. Hopefully you guys at StackOverflow can help me out as you always do. You people see everything I swear, and that's why I love you so.
In Mage/GUI/UIContext.h you included "Mage/GUI/Frame.h" and after that in Mage/GUI/Frame.h you included "Mage/GUI/UIContext.h". This is the reason why you get those errors.You should at least change one of those includes and it should be fine.
Answering my own question: a method of UIContext was looking for the class Mage::GUI::Frame, which did not exist. The constructor for the Frame class was looking for UIContext, which didn't exist either. Adding a prototype of the class before including the headers resolved that.