Problems building Win32 sample app

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Problems building Win32 sample app

Postby jdarnold » Thu Sep 14, 2017 4:52 pm

I downloaded the binary distribution (cef_binary_3.3163.1663.g416ffeb_windows32.tar.bz2) and ran the steps to create a vs2015 wrapper, and I got the following errors when trying to build the solution:

Code: Select all
2>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2019: unresolved external symbol "public: struct _IMAGE_NT_HEADERS * __thiscall base::win::PEImage::GetNTHeaders(void)const " (?GetNTHeaders@PEImage@win@base@@QBEPAU_IMAGE_NT_HEADERS@@XZ) referenced in function "struct _UNICODE_STRING * __cdecl sandbox::GetImageInfoFromModule(struct HINSTANCE__ *,unsigned int *)" (?GetImageInfoFromModule@sandbox@@YAPAU_UNICODE_STRING@@PAUHINSTANCE__@@PAI@Z)
2>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2019: unresolved external symbol "public: void * __thiscall base::win::PEImage::GetImageDirectoryEntryAddr(unsigned int)const " (?GetImageDirectoryEntryAddr@PEImage@win@base@@QBEPAXI@Z) referenced in function "public: struct _IMAGE_EXPORT_DIRECTORY * __thiscall base::win::PEImage::GetExportDirectory(void)const " (?GetExportDirectory@PEImage@win@base@@QBEPAU_IMAGE_EXPORT_DIRECTORY@@XZ)
2>cef_sandbox.lib(eat_resolver.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
2>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
2>cef_sandbox.lib(profiler.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
2>cef_sandbox.lib(win_utils.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
2>cef_sandbox.lib(resolver.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
2>cef_sandbox.lib(resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(service_resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(eat_resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(sidestep_resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(profiler.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(win_utils.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(policy_broker.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
2>cef_sandbox.lib(profiler.obj) : error LNK2019: unresolved external symbol "public: struct _IMAGE_SECTION_HEADER * __thiscall base::win::PEImage::GetImageSectionHeaderByName(char const *)const " (?GetImageSectionHeaderByName@PEImage@win@base@@QBEPAU_IMAGE_SECTION_HEADER@@PBD@Z) referenced in function "bool __cdecl base::debug::IsBinaryInstrumented(void)" (?IsBinaryInstrumented@debug@base@@YA_NXZ)
2>cef_sandbox.lib(profiler.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall base::win::PEImage::EnumImportChunks(bool (__cdecl*)(class base::win::PEImage const &,char const *,struct _IMAGE_THUNK_DATA32 *,struct _IMAGE_THUNK_DATA32 *,void *),void *)const " (?EnumImportChunks@PEImage@win@base@@QBE_NP6A_NABV123@PBDPAU_IMAGE_THUNK_DATA32@@2PAX@Z3@Z) referenced in function "unsigned int (__cdecl*__cdecl base::debug::`anonymous namespace'::FindFunctionInImports<unsigned int (__cdecl*)(unsigned int)>(char const *))(unsigned int)" (??$FindFunctionInImports@P6AII@Z@?A0x8b5b0405@debug@base@@YAP6AII@ZPBD@Z)
2>cef_sandbox.lib(policy_broker.obj) : error LNK2019: unresolved external symbol "public: int (__stdcall*__thiscall base::win::PEImage::GetProcAddress(char const *)const )(void)" (?GetProcAddress@PEImage@win@base@@QBEP6GHXZPBD@Z) referenced in function "bool __cdecl sandbox::InitGlobalNt(void)" (?InitGlobalNt@sandbox@@YA_NXZ)
2>cef_sandbox.lib(resolver.obj) : error LNK2001: unresolved external symbol "public: int (__stdcall*__thiscall base::win::PEImage::GetProcAddress(char const *)const )(void)" (?GetProcAddress@PEImage@win@base@@QBEP6GHXZPBD@Z)
2>cef_sandbox.lib(service_resolver.obj) : error LNK2001: unresolved external symbol "public: int (__stdcall*__thiscall base::win::PEImage::GetProcAddress(char const *)const )(void)" (?GetProcAddress@PEImage@win@base@@QBEP6GHXZPBD@Z)
2>cef_sandbox.lib(eat_resolver.obj) : error LNK2019: unresolved external symbol "public: unsigned long * __thiscall base::win::PEImage::GetExportEntry(char const *)const " (?GetExportEntry@PEImage@win@base@@QBEPAKPBD@Z) referenced in function "public: virtual long __thiscall sandbox::EatResolverThunk::ResolveTarget(void const *,char const *,void * *)" (?ResolveTarget@EatResolverThunk@sandbox@@UAEJPBXPBDPAPAX@Z)
2>cef_sandbox.lib(sidestep_resolver.obj) : error LNK2019: unresolved external symbol "public: struct _IMAGE_SECTION_HEADER * __thiscall base::win::PEImage::GetImageSectionFromAddr(void *)const " (?GetImageSectionFromAddr@PEImage@win@base@@QBEPAU_IMAGE_SECTION_HEADER@@PAX@Z) referenced in function "private: static bool __cdecl sandbox::SmartSidestepResolverThunk::IsInternalCall(void const *,void *)" (?IsInternalCall@SmartSidestepResolverThunk@sandbox@@CA_NPBXPAX@Z)
2>C:\Users\jdarn\Desktop\cef_binary_3.3163.1663.g416ffeb_windows32\build\tests\cefsimple\Debug\cefsimple.exe : fatal error LNK1120: 9 unresolved externals
1>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2019: unresolved external symbol "public: struct _IMAGE_NT_HEADERS * __thiscall base::win::PEImage::GetNTHeaders(void)const " (?GetNTHeaders@PEImage@win@base@@QBEPAU_IMAGE_NT_HEADERS@@XZ) referenced in function "struct _UNICODE_STRING * __cdecl sandbox::GetImageInfoFromModule(struct HINSTANCE__ *,unsigned int *)" (?GetImageInfoFromModule@sandbox@@YAPAU_UNICODE_STRING@@PAUHINSTANCE__@@PAI@Z)
1>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2019: unresolved external symbol "public: void * __thiscall base::win::PEImage::GetImageDirectoryEntryAddr(unsigned int)const " (?GetImageDirectoryEntryAddr@PEImage@win@base@@QBEPAXI@Z) referenced in function "public: struct _IMAGE_EXPORT_DIRECTORY * __thiscall base::win::PEImage::GetExportDirectory(void)const " (?GetExportDirectory@PEImage@win@base@@QBEPAU_IMAGE_EXPORT_DIRECTORY@@XZ)
1>cef_sandbox.lib(eat_resolver.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
1>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
1>cef_sandbox.lib(profiler.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
1>cef_sandbox.lib(win_utils.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
1>cef_sandbox.lib(resolver.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall base::win::PEImage::VerifyMagic(void)const " (?VerifyMagic@PEImage@win@base@@QBE_NXZ)
1>cef_sandbox.lib(resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(service_resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(eat_resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(sidestep_resolver.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(sandbox_nt_util.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(profiler.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(win_utils.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(policy_broker.obj) : error LNK2001: unresolved external symbol "public: virtual void * __thiscall base::win::PEImage::RVAToAddr(unsigned long)const " (?RVAToAddr@PEImage@win@base@@UBEPAXK@Z)
1>cef_sandbox.lib(profiler.obj) : error LNK2019: unresolved external symbol "public: struct _IMAGE_SECTION_HEADER * __thiscall base::win::PEImage::GetImageSectionHeaderByName(char const *)const " (?GetImageSectionHeaderByName@PEImage@win@base@@QBEPAU_IMAGE_SECTION_HEADER@@PBD@Z) referenced in function "bool __cdecl base::debug::IsBinaryInstrumented(void)" (?IsBinaryInstrumented@debug@base@@YA_NXZ)
1>cef_sandbox.lib(profiler.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall base::win::PEImage::EnumImportChunks(bool (__cdecl*)(class base::win::PEImage const &,char const *,struct _IMAGE_THUNK_DATA32 *,struct _IMAGE_THUNK_DATA32 *,void *),void *)const " (?EnumImportChunks@PEImage@win@base@@QBE_NP6A_NABV123@PBDPAU_IMAGE_THUNK_DATA32@@2PAX@Z3@Z) referenced in function "unsigned int (__cdecl*__cdecl base::debug::`anonymous namespace'::FindFunctionInImports<unsigned int (__cdecl*)(unsigned int)>(char const *))(unsigned int)" (??$FindFunctionInImports@P6AII@Z@?A0x8b5b0405@debug@base@@YAP6AII@ZPBD@Z)
1>cef_sandbox.lib(policy_broker.obj) : error LNK2019: unresolved external symbol "public: int (__stdcall*__thiscall base::win::PEImage::GetProcAddress(char const *)const )(void)" (?GetProcAddress@PEImage@win@base@@QBEP6GHXZPBD@Z) referenced in function "bool __cdecl sandbox::InitGlobalNt(void)" (?InitGlobalNt@sandbox@@YA_NXZ)
1>cef_sandbox.lib(resolver.obj) : error LNK2001: unresolved external symbol "public: int (__stdcall*__thiscall base::win::PEImage::GetProcAddress(char const *)const )(void)" (?GetProcAddress@PEImage@win@base@@QBEP6GHXZPBD@Z)
1>cef_sandbox.lib(service_resolver.obj) : error LNK2001: unresolved external symbol "public: int (__stdcall*__thiscall base::win::PEImage::GetProcAddress(char const *)const )(void)" (?GetProcAddress@PEImage@win@base@@QBEP6GHXZPBD@Z)
1>cef_sandbox.lib(eat_resolver.obj) : error LNK2019: unresolved external symbol "public: unsigned long * __thiscall base::win::PEImage::GetExportEntry(char const *)const " (?GetExportEntry@PEImage@win@base@@QBEPAKPBD@Z) referenced in function "public: virtual long __thiscall sandbox::EatResolverThunk::ResolveTarget(void const *,char const *,void * *)" (?ResolveTarget@EatResolverThunk@sandbox@@UAEJPBXPBDPAPAX@Z)
1>cef_sandbox.lib(sidestep_resolver.obj) : error LNK2019: unresolved external symbol "public: struct _IMAGE_SECTION_HEADER * __thiscall base::win::PEImage::GetImageSectionFromAddr(void *)const " (?GetImageSectionFromAddr@PEImage@win@base@@QBEPAU_IMAGE_SECTION_HEADER@@PAX@Z) referenced in function "private: static bool __cdecl sandbox::SmartSidestepResolverThunk::IsInternalCall(void const *,void *)" (?IsInternalCall@SmartSidestepResolverThunk@sandbox@@CA_NPBXPAX@Z)


Any ideas?
jdarnold
Newbie
 
Posts: 2
Joined: Thu Sep 14, 2017 4:43 pm

Re: Problems building Win32 sample app

Postby jdarnold » Fri Sep 15, 2017 2:30 pm

I think the problem is that the sandbox lib was built for VS2013. If I follow the instructions here:

https://bitbucket.org/chromiumembedded/cef-project

and use the download found here:

https://bitbucket.org/chromiumembedded/ ... /downloads

it works fine. And I notice in the file cefsimple_win.cc, there is this comment:

// The cef_sandbox.lib static library is currently built with VS2013. It may not
// link successfully with other VS versions.

I'm thinking perhaps this latest download is built with vs2017, given it is the recommended VS.

The other thing I did different was to use the 64 bit build.
jdarnold
Newbie
 
Posts: 2
Joined: Thu Sep 14, 2017 4:43 pm

Re: Problems building Win32 sample app

Postby magreenblatt » Fri Sep 15, 2017 2:51 pm

That comment in cefsimple_win.cc should be updated. We're currently building with VS2015 update 3 and the resulting cef_sandbox.lib should work with VS2015 and VS2017.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Problems building Win32 sample app

Postby magreenblatt » Fri Sep 15, 2017 2:52 pm

Also, cef-project is still using 3.3112 so it could be a new problem with 3.3163.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Problems building Win32 sample app

Postby magreenblatt » Wed Sep 20, 2017 4:25 am

magreenblatt wrote:Also, cef-project is still using 3.3112 so it could be a new problem with 3.3163.

Filed as https://bitbucket.org/chromiumembedded/cef/issues/2266
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 66 guests