Mruby compilation notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.