wasdk / WebAssemblyStudio

Learn, Teach, Work and Play in the WebAssembly Studio
http://webassembly.studio
MIT License
2.93k stars 274 forks source link

wasm file compiled from c++ is wrong #428

Closed stkevintan closed 5 years ago

stkevintan commented 5 years ago

https://webassembly.studio/?f=yt0jt76eey

MaxGraey commented 5 years ago

You should use WASM_EXPORT

#define WASM_EXPORT __attribute__((visibility("default")))

WASM_EXPORT void sort() {
...
}
stkevintan commented 5 years ago

@MaxGraey Thank you!

GirkovArpa commented 4 years ago

Why can't we use extern "C" { ... } like @ the original website?

Seriously, the original website is 100x better. It lets me write C++ and "just works".