Join GitHub today
When mruby 1.3 is released, Should I switch C99 to C++ subsets for writing a gem? #3470
The latest mruby with a c++ gem that is built by C++ (reference :=> #3267).
A gem author must write a gem with C++ subsets when they use a third-party c++ gem because a pedantic C++ compiler hasn't support "compound literals" and "designated initializers" (see more example :=> https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B ).
It doesn't work with
MRuby::Build.new do |conf| toolchain :visualcpp conf.enable_test conf.enable_cxx_exception end
Then, I got error from AppVeyor (https://ci.appveyor.com/project/bggd/mrb-with-cpp/build/job/ktkhoa9ah50kqfam ).
MRuby::Build.new do |conf| if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] toolchain :visualcpp else toolchain :gcc #conf.cxx.flags += %w(-pedantic-errors) end conf.gembox 'full-core' conf.gem :github => 'bggd/dummy-c99gem' conf.gem :github => 'bggd/dummy-cxxgem' conf.enable_debug conf.enable_test conf.enable_cxx_exception end
I got error from Appveyor( https://ci.appveyor.com/project/bggd/mrb-with-cpp/build/1.0.8 ) and Travis CI ( https://travis-ci.org/bggd/mrb-with-cpp/builds/206944425 ).
the visualcpp(AppVeyor) can build with 'full-core'. But it doesn't build with c++ gem.
An error from Travis CI:
An error from AppVeyor: