Compilation and installation from ruby source code in win7, and win7ruby source code compilation

Source: Internet
Author: User

Compilation and installation from ruby source code in win7, and win7ruby source code compilation

At work, we need to embed ruby c api in c ++ Code. However, compilation fails in the vs project, so we can find the reason by manually compiling ruby from the source code (previously installed using rubyinstaller ).

First download the ruby 2.4.1 version from the official website, the https://www.ruby-lang.org/en/downloads/ from the installation guide can be seen, the official only provides the linux platform for the compilation and installation steps, the https://www.ruby-lang.org/en/documentation/installation/#building-from-source and the operations performed in windows slightly different, 1. go to the downloaded ruby root directory and execute win32 \ configure. bat i686-mswin32 2. run nmake 3. run nmake rubyw.exe 4. run the namke test command to check whether the ruby executable file has been generated after the test is executed. You need to install the file in the target path. For example, C: \ opt \ ruby, run the following command: 5. nmake DESTDIR = C: \ opt \ ruby install C: \ opt \ ruby \ bin is added to the PATH variable to complete ruby compilation and installation.

Related Article

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.