1

I am learning emscripten compiler. And now I have an error when compiling this source code.

I use gcc and it works fine.

But, when using emscripten with this command:

./emcc game.cpp main.cpp painter.cpp field.cpp snake.cpp -s LEGACY_GL_EMULATION=1 -o a.html

I get this error.:

warning: unresolved symbol: _ZTVN10__cxxabiv120__si_class_type_infoE`

What are the issues here?

gagolews
  • 12,836
  • 2
  • 50
  • 75
Chiakey
  • 131
  • 3
  • 8
  • 1
    I think its very vague to describe this as a duplicate of https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix – Akshay Hazari Aug 02 '17 at 13:26
  • This is more specific then the claimed duplicate which only describes in general how to fix this type of issue but does not address issues caused by compiling c++ code on a c compiler or vise versa. – wheredidthatnamecomefrom Dec 30 '19 at 01:19

1 Answers1

2

Try em++ isntead of emcc. I am not too familiar with emscripten, but the missing symbol is the vtable for __cxxabiv1::__si_class_type_info, so you probably need to link the libcxxabi.

sbabbi
  • 11,070
  • 2
  • 29
  • 57