Page 1 of 1

Linking multiple copies of CEF

PostPosted: Tue Jan 31, 2017 4:21 am
by hoverboy
Hi,

perhaps this is a bit of a strange question: Would it be feasible to produce my own static lib (or dll) that statically linked in CEF and then my lib were to be used in another project that also tried to include the same or another version of CEF?
E.g. I'm just wrapping CEF, adding my own stuff, delivering a DLL to be used in another project and that project also decides to use CEF for their own purposes.

thanks for any info.

Re: Linking multiple copies of CEF

PostPosted: Wed Feb 01, 2017 1:59 am
by amaitland
You couldn't load different versions at the same time in the same process. Also CefInitialize/CefShutdown can only be called once, so someone would need to take ownership of initializing and shutting down CEF

Is there a reason you'd wish to statically link? If your both going to be using the same library then it doesn't make much sense to me.

Re: Linking multiple copies of CEF

PostPosted: Fri Feb 03, 2017 9:02 am
by hoverboy
Thanks for the reply.

The idea I was exploring was to make a special UI control that used CEF and that would be delivered as a single static library that anyone could use in their project.
But it would have to play nicely with anything else the person uses in their app. They themselves may use CEF (and perhaps a different version) for other purposes.

So I was just curious if that was at all practical.