Linking CEF cefsimple files into an application

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.

Linking CEF cefsimple files into an application

Postby srmaxwell3 » Mon Aug 08, 2022 2:06 pm

Hello, folks. I'm trying to link my application with the contents of cefsimple/cefsime_mac.mm integrated into my application's main.cpp, and with the cefsimple application's source files (cefsimple/simple_app.cc, cefsimple/simple_handler.cc, and cefsimple/simple_handler_mac.mm) added. I'm linking with libcef_static.a and libcef_dll_wrapper.a, and I'm getting nearly 4300 unresolved symbols. I searched through all of the symbols defined in the .a's built in my copy of the latest release, and found 149 libraries exporting the unresolved symbols, including libcef_static.a and libcef_dll_wrapper.a (???). So I added 5 more CEF libraries to the link, hoping to resolve some larger subset, only to get errors like the following:

ld: in deps/cef/lib/Debug/libbrowser.a(platform_util_mac.o), archive member 'platform_util_mac.o' with length 316696 is not mach-o or llvm bitcode for architecture x86_64

Does anyone have any suggestions?
srmaxwell3
Techie
 
Posts: 13
Joined: Fri Jul 08, 2022 5:22 pm

Re: Linking CEF cefsimple files into an application

Postby srmaxwell3 » Mon Aug 08, 2022 4:24 pm

I may have used a distribution that I shouldn't. If I grab libcef_dll_wrapper.a et al from cef_binary_103.0.12+g8eb56c7+chromium-103.0.5060.134_macosx64, I'm down to just 3 unresolved symbols, and it appears that they're all Apple symbols:

Undefined symbols for architecture x86_64:
"_NSApp", referenced from:
-[SimpleApplication terminate:] in main.cpp.o
-[SimpleAppDelegate createApplication:] in main.cpp.o
_main in main.cpp.o
(maybe you meant: __OBJC_PROTOCOL_$_NSApplicationDelegate, __OBJC_LABEL_PROTOCOL_$_NSApplicationDelegate )
"_OBJC_CLASS_$_NSApplication", referenced from:
_OBJC_CLASS_$_SimpleApplication in main.cpp.o
objc-class-ref in main.cpp.o
"_OBJC_METACLASS_$_NSApplication", referenced from:
_OBJC_METACLASS_$_SimpleApplication in main.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)
srmaxwell3
Techie
 
Posts: 13
Joined: Fri Jul 08, 2022 5:22 pm

Re: Linking CEF cefsimple files into an application

Postby ndesktop » Mon Aug 08, 2022 5:08 pm

Maybe somehow "-framework Cocoa" is missing?
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

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