atlbase.h not found (VS2008)
Basically, I'm trying to compile CEF on VS2008 EE.
The IDE complains that it cannot find atlbase.h
. During some research, I've found this reference.
Considering this isn't the first time I gave C++ another chance, I wasn't really surprised I had the WinSDK installed already. But of course, the IDE doesn't know this and the SDK registration tool doesn't seem to work (even if it says it does).
So, I went to the project options and force-added the paths to the WinSDK source folders. That helped me get rid of the "atlbase.h not found" error. Instead, I started having multiple errors; 33 in fact, some of which were quite cryptic complaining things like _Module was not defined.
These are the errors:
Compiling...
uiplugin_test.cpp
uiplugin.cpp
string_util.cpp
scheme_test.cpp
resource_util_win.cpp
plugin_test.cpp
SDK\Include\atl\atlwin.h(65) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(79) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(155) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(155) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
SDK\Include\atl\atlwin.h(168) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(168) : error C2228: left of '.GetModuleInstance' must ha开发者_高级运维ve class/struct/union
type is ''unknown-type''
SDK\Include\atl\atlwin.h(1753) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1753) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1753) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1755) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1757) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(2979) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(2979) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
SDK\Include\atl\atlwin.h(3058) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(3058) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
osrplugin_test.cpp
osrplugin.cpp
extension_test.cpp
download_handler.cpp
clientplugin.cpp
SDK\Include\atl\atlwin.h(65) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(79) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(155) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(155) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
SDK\Include\atl\atlwin.h(168) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(168) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
SDK\Include\atl\atlwin.h(1753) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1753) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1753) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1755) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(1757) : error C2065: 'i' : undeclared identifier
SDK\Include\atl\atlwin.h(2979) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(2979) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
SDK\Include\atl\atlwin.h(3058) : error C2065: '_Module' : undeclared identifier
SDK\Include\atl\atlwin.h(3058) : error C2228: left of '.GetModuleInstance' must have class/struct/union
type is ''unknown-type''
client_popup_handler.cpp
client_handler_win.cpp
client_handler.cpp
cefclient_win.cpp
.\cefclient_win.cpp(296) : error C3861: 'wcscpy_s': identifier not found
cefclient.cpp
SDK\Include\crt\utility(21) : error C2536: 'std::pair<_T1,_T2>::std::pair<_T1,_T2>::first' : cannot specify explicit initializer for arrays
with
[
_T1=const char [12],
_T2=const char [16]
]
SDK\Include\crt\utility(24) : see declaration of 'std::pair<_T1,_T2>::first'
with
[
_T1=const char [12],
_T2=const char [16]
]
SDK\Include\crt\utility(20) : while compiling class template member function 'std::pair<_T1,_T2>::pair(_T1 (&),_T2 (&))'
with
[
_T1=const char [12],
_T2=const char [16]
]
.\cefclient.cpp(92) : see reference to class template instantiation 'std::pair<_T1,_T2>' being compiled
with
[
_T1=const char [12],
_T2=const char [16]
] SDK\Include\crt\utility(21) : error C2536: 'std::pair<_T1,_T2>::std::pair<_T1,_T2>::second' : cannot specify explicit initializer for arrays
with
[
_T1=const char [12],
_T2=const char [16]
]
SDK\Include\crt\utility(25) : see declaration of 'std::pair<_T1,_T2>::second'
with
[
_T1=const char [12],
_T2=const char [16]
]
binding_test.cpp
Have you tried following Chromium's Build Instructions (Windows)? In particular the section under Additional (free) downloads that deals with Visual Studio 2008 Express (item 4 here).
I have found a solution to this problem. A few minutes ago I realized they also have a working version for Delphi.
After a couple of minutes, I got my Delphi install configured with the right paths and now it builds nicely.
精彩评论