kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.33k stars 196 forks source link

Generating box2d.clean.h #7

Closed unphased closed 11 years ago

unphased commented 11 years ago

I'm in need of a compiled box2d.js which uses no typed arrays (because of lack of Float64Array support).

So I am attempting to use emcc with the makefile provided with box2d.js project. I have been able to get emcc working (follow the emscripten Tutorial)

Currently failing here:

box2d.clean.h:
    cpp -x c++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h > box2d.clean.h
$ cpp -x c++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h > box2d.clean.h
i686-apple-darwin11-llvm-gcc-4.2: c: No such file or directory
i686-apple-darwin11-llvm-gcc-4.2: c++: No such file or directory
i686-apple-darwin11-llvm-gcc-4.2: warning: '-x -x' after last input file has no effect
i686-apple-darwin11-llvm-gcc-4.2: no input files
kripken commented 11 years ago

On stack overflow looks like the issue was -xc++ vs -x c++

http://stackoverflow.com/questions/12851351/box2d-emscripten-what-is-box2d-clean-h-and-how-to-successfully-generate-it

Different compiler versions I guess? I added a comment in the makefile.

unphased commented 11 years ago

Thanks, that was me :)

kripken commented 11 years ago

heh I suspected it might be ;)

mvasilkov commented 11 years ago

I think, -x=c++ should work consistently on either platform. It's probably GNU getopt vs. BSD getopt issue.

Confirmed working on Mac OS X 10.8