Git Product home page Git Product logo

Comments (7)

bunnyhero avatar bunnyhero commented on May 24, 2024

I had to make these changes to get it to build on Mac OS X:

bunnyhero@0ef6eac#Makefile

from box2d.js.

no-zzz-un avatar no-zzz-un commented on May 24, 2024

thanks, but unfortunately this just leads to another problem:

cpp -xc++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h > box2d.clean.h
# CppHeaderParser doesn't like Xcode's cpp output: this fixes it.
sed -i -e 's/__signed/signed/g;s/__const/const/g' box2d.clean.h
python 1/tools/bindings_generator.py box2d_bindings box2d.clean.h -- '{ "ignored": "b2Shape::m_type,b2BroadPhase::RayCast,b2BroadPhase::UpdatePairs,b2BroadPhase::Query,b2DynamicTree::RayCast,b2DynamicTree::Query,b2ChainShape::m_nextVertex,b2ChainShape::m_hasNextVertex,b2EdgeShape::m_hasVertex3,b2EdgeShape::m_vertex2,b2EdgeShape::m_vertex3,b2Mat22,b2Mat33" }' > bindings.out
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '1/tools/bindings_generator.py': [Errno 2] No such file or directory
make: *** [box2d_bindings.cpp] Error 2

from box2d.js.

bunnyhero avatar bunnyhero commented on May 24, 2024

Oh yeah, I forgot. You also have to add a line like this:

EMSCRIPTEN=/Users/bunnyhero/dev/github/emscripten

except substituting the path to your emscripten directory.

You can either add that line to the Makefile, or (as I did), put it in a file named Makefile.local in the same directory as the Makefile (it will get included).

from box2d.js.

no-zzz-un avatar no-zzz-un commented on May 24, 2024

thanks, this seems to have fixed everything!

from box2d.js.

timotheecour avatar timotheecour commented on May 24, 2024

This doesn't work for me:
cpp points to apple's version of clang that uses a different version of llvm.

should I use {/path/to/correct/clang -E} instead of {cpp} ?
that compiles but with lots of warnings (eg: has C-linkage specified, but returns user-defined type), and the resulting html doesn't work properly.

from box2d.js.

jarbot avatar jarbot commented on May 24, 2024

This fix is not working for me either. I tried installing the 3.2 and 3.3 version of LLVM.

I followed these instructions manually as well as with brew:
https://github.com/kripken/emscripten/wiki/Getting-started-on-Mac-OS-X

I'm on osx 10.9.3. Here's the errors I'm currently seeing (with LLVM 3.2):
https://gist.github.com/jarbot/0af2ace168d3b12030e0

I switched over to an Ubuntu 14 VM with similar results:
https://gist.github.com/jarbot/20377f66318b21b3e549

from box2d.js.

jarbot avatar jarbot commented on May 24, 2024

I was finally able to get a emscripten build working on box2d on Ubuntu 14 by following these instructions https://github.com/kripken/emscripten/wiki/LLVM-Backend#getting-fastcomp for setting up LLVM and clang. I followed the exact same steps for Mac os 10.9 and still see these errors: https://gist.github.com/jarbot/0af2ace168d3b12030e0

from box2d.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.