WebAssembly / binaryen

Optimizer and compiler/toolchain library for WebAssembly
Apache License 2.0
7.38k stars 724 forks source link

Windows (VS2013) doesn't compile #325

Open griffin2000 opened 8 years ago

griffin2000 commented 8 years ago

Windows doesn't compile for me, had to hack file.cpp a bit to get it to work.

file.zip

jfbastien commented 8 years ago

Please send a PR.

griffin2000 commented 8 years ago

PR sent. Though note this is just code that works for me, not necessarily suitable for checking into master.

jasonmoore29 commented 8 years ago

I also cannot compile using VS2015, after following the instructions on https://github.com/brakmic/brakmic/blob/master/webassembly/COMPILING_WIN32.md

The issue is also in file.cpp Error C2676 binary '|=': 'std::_Iosb<int>::_Openmode' does not define this operator or a conversion to a type acceptable to the predefined operator support binaryen\src\support\file.cpp 27 Error C1001 An internal error has occurred in the compiler. support binaryen\src\support\file.cpp 27

kripken commented 8 years ago

This is definitely an area where we need help! Most (all?) of the main devs here are not on windows, and the VS errors are very unclear sometimes, at least to me. The current errors can be seen on the emscripten windows bot, btw (search for "test_binaryen"), e.g. here

griffin2000 commented 8 years ago

That is the same error I got in VS2013, I fixed by making everything an int, but I suspect that is not the correct solution. I will see if I can work out the correct fix when I get the chance (if no one else gets to it first)