diff --git a/Mrbgems-FAQ.md b/Mrbgems-FAQ.md index 3978065..23ae2c7 100644 --- a/Mrbgems-FAQ.md +++ b/Mrbgems-FAQ.md @@ -9,8 +9,32 @@ In detail, see https://github.com/mruby/mruby/blob/master/doc/mrbgems/README.md ## How to add mrbgems? -(To be written...) - +In mrubys root directory there is a file called build_config.rb that file is where you have your build information. Including the gems you want to add as well as additional information such as included header +files and libraries to be linked if your creating your gem with C extensions. Inside the build_config.rb +You can add this code in to add in your gems. +```ruby +conf.gem 'path\to\gem' +``` +If you want to include an include path you do it by writing the code below in your gem specification inside +your projects mrbgem.rake file. +```ruby +conf.cc do |cc| + cc.include_paths = '' +end +``` +Or you may run into a problem where the mruby.h can't be found in that case do this. +```ruby +conf.cc do |cc| + cc.include_paths = ['path\to\mruby\include', 'path\to\your\include'] +end +``` +Now if you want to link files you do so like this. +```ruby +spec.linker do |linker| + linker.library_paths = 'path\to\lib' + linker.libraries = ['mingw32', 'foo', 'bar'] + end +``` ## Help! My mruby don't have... ### Kernel#sleep