Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcef_dll_wrapper.a is missing #27

Open
ghost opened this issue Jul 31, 2015 · 19 comments
Open

libcef_dll_wrapper.a is missing #27

ghost opened this issue Jul 31, 2015 · 19 comments

Comments

@ghost
Copy link

ghost commented Jul 31, 2015

Hi!

hm, in the example for osX the "libcef_dll_wrapper.a" is missing...

greetings ascorbin

@mattfelsen
Copy link

Hey guys. I'm considering going down the rabbit hole that is CEF 😝 I'm seeing the same thing here, no libcef_dll_wrapper.a in the addon or in the downloads from cefbuilds.com. Did you build this from source? Hoping to not go through all that, but it may be worth it to get a newer version with 64-bit support anyway..

@ofZach
Copy link
Owner

ofZach commented Oct 27, 2015

ha welcome to a dark and mysterious cave! I haven't touched this on windows at all (or looked at it w/ 0.9...) pinging @smallfly will look at this in 0.9 / osx shortly....

@mattfelsen
Copy link

Believe it or not this isn't for Windows (I've escaped, if only for a little while..) Got a WKWebKit into OF easily but oddly can't get it to respond to mouse events properly, so figured I'd see what was up here ☺️

@ofZach
Copy link
Owner

ofZach commented Oct 27, 2015

ha right, when I saw "dll" I tuned out... I'll take a look when I have a moment. here's a .a file I had on my hard drive in the ofxCef addon:

https://www.dropbox.com/s/jz1tf2xilmfl3wd/libcef_dll_wrapper.a?dl=0

can you see if this helps, I have about 8-9 "libcef_dll_wrapper.a" around, I think some are compiled with different settings so I'll try to understand this more clearly when I have a moment.

@mattfelsen
Copy link

Hm, no dice. With the lib in there I get the same linker errors as if I had removed the lib from the project. Ah well, I may give building a newer version a shot, or keep trying with WebKit, or...

@smallfly
Copy link
Collaborator

Hi,

I have just reopened this repo yesterday. My plan is to update the add-on (incl. the CEF version - lib and framework - 64 bits on OS X and 32/64bits on Windows), and make the add-on work with OF 0.9.0 (starting with OS X). Hopefully I will have this done by the end of the week, but I can not guarantee it.

To answer your question: yes, you need to compile the libcef lib from the source.

@BruceWheaton
Copy link

I guess you didn't complete that work? I hit this same error, and 32-bit Mac CEF appears to be deprecated.

@BruceWheaton
Copy link

Following up... I'm trying to move to modern CEF and OF and OS X and 64-bit. I used the latest CEF, and after much much pain, have got the dll wrapper compiled with lbstdC++ not GNU (which stopped the helper and ofx app compiling with C++11). The key was to edit the deploy target in the CMAKE target, which it calls 'min'.
Haven't made it run yet, I suspect I don't have the libraries in the right place yet. Tried to copy in the CEF framework, but I haven't looked at loader paths. Yuck.
Yes:
dyld: Library not loaded: @executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
Referenced from: /Users/me/openFrameworks/addons/ofxCef/example_ofxCEF/bin/example-ofxCEFDebug.app/Contents/MacOS/example-ofxCEFDebug
Reason: no suitable image found. Did find:
/Users/me/openFrameworks/addons/ofxCef/example_ofxCEF/bin/example-ofxCEFDebug.app/Contents/MacOS/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework: mach-o, but wrong architecture
/Users/me/openFrameworks/addons/ofxCef/example_ofxCEF/bin/example-ofxCEFDebug.app/Contents/MacOS/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework: mach-o, but wrong architecture
The CEF framework I have is the one from the CEF binary download...

@ofZach
Copy link
Owner

ofZach commented Mar 8, 2016

sorry I should have followed up - I've done basically the same thing (!) and have 64 bit 0.9.0 osx working, but I did (I think, not 100% sure) roll back some of the changes to what was a more performant version of the addon code. I honestly don't have the bandwidth to do the merge but if you are fine poking around a zip of a working 0.9 / osx thing I'm happy to put it online for you and then take a PR...

@BruceWheaton
Copy link

Oh, cool. Yes please! I've been digging all day and punting. Love to have a trove that I know will work. Everything else I tried isn't getting me the result I need (Awesomium rendering looks nasty, for instance).

@BruceWheaton
Copy link

Yes, an example would be great please. I solved the link error - a script that copied in the 32-bit CEF framework, but I only get a blank window with a frame rate counter, so something is off.
Of course, I'm an ofxNewbie.

@robotconscience
Copy link

Hey @BruceWheaton I'm in the same spot as you. Let me know if you've had any luck!

For other OF 0.9+ w/ CEF-seekers out there, here's what I did so far to at least get stuff compiling:

  • Download latest CEF

  • Make Xcode projects based on their instructions:

     $ cd path/to/cef_binary_*
     $ mkdir build && cd build
     $ cmake -G "Xcode"
    
  • Open Xcode project and edit these settings for libcef_dll_helper product

    • Architectures: Universal
    • OS X Deployment target: 10.7
    • Other C++ Flags: change "-mmacosx-version-min=10.6" to "-mmacosx-version-min=10.7"
    • C Language dialect: C++11
    • C++ Standard Library: libc++
  • Also edited the Scheme to build as "Release"

  • Build libcef_dll_helper.a and copy files to the addon:

    • Chromium Embedded Framework.framework
    • libcef_dll_helper.a
    • 'include' folder

Beyond that, the only other thing I changed was switching "C++ Standard Library" in cefHelper target to libc++ as well.

@robotconscience
Copy link

Oh! Update, now it's working!

The issue I was having was cefHelper was throwing errors that it didn't have FMOD (which I ignored). I added a "Run Script" phase to build, and added the default copy-fmod-in script from general OF project (below) and viola, it works.

# Copy libfmod and change install directory for fmod to run
rsync -aved ../../../libs/fmodex/lib/osx/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/";
install_name_tool -change @executable_path/libfmodex.dylib @executable_path/../Frameworks/libfmodex.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";
# Copy GLUT framework (must remove for AppStore submissions)
rsync -aved ../../../libs/glut/lib/osx/GLUT.framework "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/"

@ofZach
Copy link
Owner

ofZach commented Mar 9, 2016

if it's helpful, here's a 0.9 version where I think I have rolled back the addon code for performance reasons (not 100% sure but I found the code got slower in most recent version of the addon). I don't have time to merge this or study this but just zipping it up in case it helps.

https://dl.dropboxusercontent.com/u/92337283/OF/ofxCef_works3.zip

cef is quite hard! happy to have more eyeballs on this on this --

@robotconscience also I think you can remove fmod from the linking on cefHelper, which I may have done here -- that gets rid of the dylib needs, etc

@robotconscience
Copy link

@ofZach thank you for posting! Totally helpful.

And yes, agreed–CEF is hard an weird, but also pretty cool. Will post if I make any headway! Thanks again for sharing your WIP stuff.

@ascorbin
Copy link

ascorbin commented Mar 9, 2016

yey!

@BruceWheaton
Copy link

Great, thanks. I had mine compiling but it produced no output. Yours came right up - cool.
Just need to see how much javascript and events to fight with! For instance - scrolling events not working on a page? Is that an ofx thing?

@ofZach
Copy link
Owner

ofZach commented Mar 9, 2016

hmm - this should be linking scroll up:

https://github.com/ofZach/ofxCef/blob/master/example_ofxCEF/src/ofApp.cpp#L6-L8

there's still alot to connect up...

@BruceWheaton
Copy link

Ah ha! In your scratch repo, it’s commented out. Thanks! Remind me to look at least a tiny bit before posting next time.

On Mar 9, 2016, at 3:42 PM, ofZach [email protected] wrote:

hmm - this should be linking scroll up:

https://github.com/ofZach/ofxCef/blob/master/example_ofxCEF/src/ofApp.cpp#L6-L8 https://github.com/ofZach/ofxCef/blob/master/example_ofxCEF/src/ofApp.cpp#L6-L8
there's still alot to connect up...


Reply to this email directly or view it on GitHub #27 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants