I am attempting to take an app that was based on CEF2272 and update it to CEF2704. The update was successfully performed for the windows build but fails for the osx build.
There were a lot of errors that I ran into, but I've sort off worked around them. The app has some C++11 requirements and uses libc++ as it's std lib, so I had to compile libcef_dll with -stdlib=libc++ .
The next error that I ran into is that the cmake is still configured for the old way of creating helpers using the tools/make_more_helpers.sh which doesn't exist anymore in the new versions of CEF. I've worked around this by just taking the tools folder from the old versions of CEF and using that, but if anyone has any tips of how to migrate to the new way of it being done, that would be very appreciated.
Here is the current cmake for cef helper generation
- Code: Select all
add_custom_command(TARGET cef-isolation POST_BUILD
# Remember if you change this but don't cause a recompile in the shared object it will not rename it successfully
COMMAND install_name_tool -change "@executable_path/Chromium Embedded Framework" "@rpath/Chromium Embedded Framework.framework/Chromium Embedded Framework" "$<TARGET_FILE:cef-isolation>"
# Make a Frameworks directory
COMMAND mkdir -p "$<TARGET_FILE_DIR:cef-isolation>/../Frameworks"
# Copy the CEF and support frameworks
COMMAND cp -Rf "${CEF_ROOT_DIR}/Release/Chromium Embedded Framework.framework" "$<TARGET_FILE_DIR:cef-isolation>/../Frameworks/"
# Setup the helper apps
COMMAND rm -rf "$<TARGET_FILE_DIR:cef-isolation>/../Frameworks/CEF Helper.app"
COMMAND cp -Rf "$<TARGET_FILE_DIR:cef-bootstrap>/../../../CEF Helper.app" "$<TARGET_FILE_DIR:cef-isolation>/../Frameworks"
COMMAND "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:cef-isolation>/../../.." "CONTENTS_FOLDER_PATH=CEF.app/Contents" "${CEF_ROOT_DIR}/tools/make_more_helpers.sh" "Frameworks" "CEF")
But like I said, just copying the old tools folder sort of works around it, and this is where I get to my biggest problem. My project seems to be building fine, until it gets to the very end and starts linking a shared module, resulting in the following error
- Code: Select all
Undefined symbols for architecture x86_64:
"CefParseURL(CefStringBase<CefStringTraitsUTF16> const&, CefStructBase<CefURLPartsTraits>&)", referenced from:
BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest>, CefRefPtr<CefCallback>) in browser-scheme.cpp.o
"CefURIDecode(CefStringBase<CefStringTraitsUTF16> const&, bool, cef_uri_unescape_rule_t)", referenced from:
BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest>, CefRefPtr<CefCallback>) in browser-scheme.cpp.o
"CefGetMimeType(CefStringBase<CefStringTraitsUTF16> const&)", referenced from:
BrowserSchemeHandler::GetResponseHeaders(CefRefPtr<CefResponse>, long long&, CefStringBase<CefStringTraitsUTF16>&) in browser-scheme.cpp.o
"_cef_string_utf16_clear", referenced from:
BrowserLoadHandler::OnLoadEnd(CefRefPtr<CefBrowser>, CefRefPtr<CefFrame>, int) in browser-load-handler.cpp.o
CefStringBase<CefStringTraitsUTF16>::~CefStringBase() in browser-load-handler.cpp.o
CefStringBase<CefStringTraitsUTF16>::~CefStringBase() in browser-load-handler.cpp.o
BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest>, CefRefPtr<CefCallback>) in browser-scheme.cpp.o
BrowserSchemeHandler::GetResponseHeaders(CefRefPtr<CefResponse>, long long&, CefStringBase<CefStringTraitsUTF16>&) in browser-scheme.cpp.o
CefStringBase<CefStringTraitsUTF16>::~CefStringBase() in browser-scheme.cpp.o
CefStructBase<CefURLPartsTraits>::~CefStructBase() in browser-scheme.cpp.o
...
"_cef_string_utf16_to_utf8", referenced from:
BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest>, CefRefPtr<CefCallback>) in browser-scheme.cpp.o
"_cef_string_utf8_clear", referenced from:
BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest>, CefRefPtr<CefCallback>) in browser-scheme.cpp.o
"_cef_string_utf8_to_utf16", referenced from:
BrowserLoadHandler::OnLoadEnd(CefRefPtr<CefBrowser>, CefRefPtr<CefFrame>, int) in browser-load-handler.cpp.o
BrowserSchemeHandler::ProcessRequest(CefRefPtr<CefRequest>, CefRefPtr<CefCallback>) in browser-scheme.cpp.o
BrowserSchemeHandler::GetResponseHeaders(CefRefPtr<CefResponse>, long long&, CefStringBase<CefStringTraitsUTF16>&) in browser-scheme.cpp.o
CefStringBase<CefStringTraitsUTF16>::FromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in browser-scheme.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If anyone has any ideas on what could be causing this, and what's the best way of finding the solution to it, it would be very appreciated.
Thanks in advance