WebAssembly / wasm-c-api

Wasm C API prototype
Apache License 2.0
534 stars 77 forks source link

undefined reference to `wasm::vec<char>::free_data()' #166

Open SpiralBL0CK opened 3 years ago

SpiralBL0CK commented 3 years ago

when compiling v8 embedding app i get this error: exploit.o: In function wasm::vec<char>::~vec()': /home/pwn/v8/v8/third_party/wasm-api/wasm.hh:63: undefined reference towasm::vec::free_data()' exploit.o: In function wasm::vec<char>::vec(unsigned long)': /home/pwn/v8/v8/third_party/wasm-api/wasm.hh:50: undefined reference towasm::vec::make_data()' collect2: error: ld returned 1 exit status

Compile Flags: g++ -I. -Iinclude -O0 -ggdb -I third_party/wasm-api -lv8_monolith -Lout.gn/x64.release.sample/obj/ -pthread -std=c++14 -DV8_COMPRESS_POINTERS -I/usr/local/include -DWASM_API_DEBUG -DBUILD_STATIC_LIB=ON -c ~/Desktop/app.cpp

g++ app.o -L/usr/local/lib -lgsl -lgslcblas -lm -I. -Iinclude -lv8_monolith -Lout.gn/x64.release.sample/obj/ -std=c++14 -DV8_COMPRESS_POINTERS -I/include /home/pwn/v8/v8/out/wee8/obj/libwee8.a -ldl -pthread