diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index 9eabd812..e016af88 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -245,7 +245,7 @@ EOS #import extern "C" { - void rb_define_const(void *, const char *, void *); + void rb_define_global_const(const char *, void *); void rb_rb2oc_exc_handler(void); void rb_exit(int); void RubyMotionInit(int argc, char **argv); @@ -334,7 +334,8 @@ EOS else config.development? ? 'development' : 'release' end - main_txt << "rb_define_const([NSObject class], \"RUBYMOTION_ENV\", @\"#{rubymotion_env}\");\n" + main_txt << "rb_define_global_const(\"RUBYMOTION_ENV\", @\"#{rubymotion_env}\");\n" + main_txt << "rb_define_global_const(\"RUBYMOTION_VERSION\", @\"#{Motion::Version}\");\n" main_txt << <