wasdk / WebAssemblyStudio

Learn, Teach, Work and Play in the WebAssembly Studio

Home Page:http://webassembly.studio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wasm file compiled from c++ is wrong

stkevintan opened this issue · comments

You should use WASM_EXPORT

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

WASM_EXPORT void sort() {
...
}

@MaxGraey Thank you!

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".