diff --git a/ext/tox/extconf.rb b/ext/tox/extconf.rb index 0b258bf..cc27b8c 100755 --- a/ext/tox/extconf.rb +++ b/ext/tox/extconf.rb @@ -13,5 +13,6 @@ have_library LIBTOXCORE, 'tox_get_savedata' and have_library LIBTOXCORE, 'tox_self_get_address' and have_library LIBTOXCORE, 'tox_bootstrap' and have_library LIBTOXCORE, 'tox_kill' and +have_library LIBTOXCORE, 'tox_version_is_compatible' and create_makefile "#{NAME}/#{NAME}" or exit(1) diff --git a/ext/tox/tox.c b/ext/tox/tox.c index abbd382..22de2ea 100644 --- a/ext/tox/tox.c +++ b/ext/tox/tox.c @@ -45,6 +45,9 @@ static VALUE cTox_cOptions_data_EQUALS(VALUE self, VALUE data); void Init_tox() { + if (!TOX_VERSION_IS_ABI_COMPATIBLE()) + rb_raise(rb_eLoadError, "incompatible Tox ABI version"); + cTox = rb_define_class("Tox", rb_cObject); rb_define_alloc_func(cTox, cTox_alloc); rb_define_method(cTox, "initialize_with", cTox_initialize_with, 1);