We have built CEF from source code referring to this page.
The branch is 3770.
My environment is
Windows 10 Pro 64bit (1809) Japanese
Visual Studio 2017 Version 15.9.13
Windows SDK Version 10.0.17763.0
The contents of the .bat file are as follows:
update.bat
set GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome is_official_build=true
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --no-distrib --no-build --branch=3770 --force-clean --force-update
create.bat
set GN_DEFINES=proprietary_codecs=true ffmpeg_branding=Chrome is_official_build=true
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
call cef_create_projects.bat
Finally, I built "Release_GN_x86" using Ninja.
The build was successful and .lib and .dll files are created.
However, linking this library with my application results in a link error.
The application is a 32-bit application using MFC.
error messages
- Code: Select all
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::ios_base::init(void *)" (?init@ios_base@__1@std@@IAEXPAX@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::basic_streambuf<char,struct std::__1::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@IAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: virtual __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::~basic_streambuf<char,struct std::__1::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@UAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: virtual __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits<char> >::~basic_ostream<char,struct std::__1::char_traits<char> >(void)" (??1?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@UAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: virtual __thiscall std::__1::basic_ios<char,struct std::__1::char_traits<char> >::~basic_ios<char,struct std::__1::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@__1@std@@@__1@std@@UAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: class std::__1::basic_ostream<char,struct std::__1::char_traits<char> > & __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits<char> >::operator<<(unsigned long)" (??6?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAEAAV012@K@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: class std::__1::basic_string<char,struct std::__1::char_traits<char>,class std::__1::allocator<char> > & __thiscall std::__1::basic_string<char,struct std::__1::char_traits<char>,class std::__1::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAEAAV123@II@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: virtual __thiscall std::__1::basic_iostream<char,struct std::__1::char_traits<char> >::~basic_iostream<char,struct std::__1::char_traits<char> >(void)" (??1?$basic_iostream@DU?$char_traits@D@__1@std@@@__1@std@@UAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__basic_string_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__basic_string_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: void __thiscall std::__1::basic_string<char,struct std::__1::char_traits<char>,class std::__1::allocator<char> >::push_back(char)" (?push_back@?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAEXD@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: void __thiscall std::__1::basic_string<char,struct std::__1::char_traits<char>,class std::__1::allocator<char> >::resize(unsigned int,char)" (?resize@?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@QAEXID@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: class std::__1::basic_ostream<char,struct std::__1::char_traits<char> > & __thiscall std::__1::basic_ostream<char,struct std::__1::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@__1@std@@@__1@std@@QAEAAV123@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: class std::__1::locale __thiscall std::__1::ios_base::getloc(void)const " (?getloc@ios_base@__1@std@@QBE?AVlocale@23@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: static class std::__1::locale::id std::__1::ctype<char>::id" (?id@?$ctype@D@__1@std@@2V0locale@23@A)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""private: class std::__1::locale::facet const * __thiscall std::__1::locale::use_facet(class std::__1::locale::id &)const " (?use_facet@locale@__1@std@@ABEPBVfacet@123@AAVid@123@@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: __thiscall std::__1::locale::~locale(void)" (??1locale@__1@std@@QAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: void __thiscall std::__1::ios_base::clear(unsigned int)" (?clear@ios_base@__1@std@@QAEXI@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""public: virtual __thiscall std::__1::basic_istream<char,struct std::__1::char_traits<char> >::~basic_istream<char,struct std::__1::char_traits<char> >(void)" (??1?$basic_istream@DU?$char_traits@D@__1@std@@@__1@std@@UAE@XZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual void __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::imbue(class std::__1::locale const &)" (?imbue@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEXABVlocale@23@@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual class std::__1::basic_streambuf<char,struct std::__1::char_traits<char> > * __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::setbuf(char *,int)" (?setbuf@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEPAV123@PADH@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::sync(void)" (?sync@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEHXZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::showmanyc(void)" (?showmanyc@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEHXZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::xsgetn(char *,int)" (?xsgetn@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEHPADH@Z)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::uflow(void)" (?uflow@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEHXZ)" は未解決です。
1>libcef_dll_wrapper.lib(cef_logging.obj) : error LNK2001: 外部シンボル ""protected: virtual int __thiscall std::__1::basic_streambuf<char,struct std::__1::char_traits<char> >::xsputn(char const *,int)" (?xsputn@?$basic_streambuf@DU?$char_traits@D@__1@std@@@__1@std@@MAEHPBDH@Z)" は未解決です。
1>libcef_dll_wrapper.lib(print_settings_ctocpp.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(render_handler_cpptoc.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(request_handler_cpptoc.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(post_data_ctocpp.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(x509certificate_ctocpp.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(transfer_util.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(v8handler_cpptoc.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(browser_ctocpp.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
1>libcef_dll_wrapper.lib(drag_handler_cpptoc.obj) : error LNK2001: 外部シンボル ""protected: void __thiscall std::__1::__vector_base_common<1>::__throw_length_error(void)const " (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IBEXXZ)" は未解決です。
The build of the "3626" branch created in the same procedure in January does not cause a link error, and the application works properly.
I think these two points.
New version of Visual Studio
New CEF branch
How do I create a library that can be linked successfully?