Notes for compiling mruby with focus on embedded scripts in Windows:
Environment:
OS: Windows 8.1, vs express 2013 for desktop.
MATERIALS:
Mruby: Download the source code.
Cruby: Download the compiled source code, but not in the scope of this article.
Bison, which can be officially recommended here, but here I am here. This is a syntax analyzer.
0. In the Express version of Vs, you can start the command line from the Start menu -- Visual Studio Tools -- vs2013 x86 local tool command prompt
1. Set the compilation option. skip this step if you do not need it. But now I need:
/MT option. You do not need to bring an egg DLL file. The cost is that the EXE file is larger.
/Dmrb_use_float option, which is macro-defined mrb_use_float, because I want to use single-precision floating point
You can set cflags. But I think it is too troublesome. directly modify the file:
Find visualcpp. Rake under mruby \ Tasks \ toolchains \ (modify the parameters for other compilers ).
For example, this is the author's.
2. Run CD to the mruby directory and run cruby's rake. bat.
If you are using the officially recommended bison and put it in the path, it will be done.
However, if you use flex_bison, it will stop in the middle. At this time, a new command line is opened and
-O des_file_path src_file_path
Convert parse. Y to Y. Tab. C:
Put the output file in the SRC folder under mrub \ build (looks like build \ host \ SRC), and continue the previous rake.
Zookeeper
Mruby compilation notes