Notes for Bug modification and. jam file for getting started with Python

Source: Internet
Author: User

This article mainly aims at modifying bugs and installing Python in c ++. in the jam file, we need to introduce relevant issues and how to deal with these problems, the following are the answers to relevant questions and descriptions of the compilation process when embedding python in c ++.

The compilation process will not be repeated. Here is a small bug in boost. I don't know if the following error occurs during compilation of Hello World.

 
 
  1. Jamroot:18: in modules.load  
  2. rule python-extension unknown in module Jamfile</F:/
    boost_1_38_0/libs/py  
  3. mple/tutorial>.  
  4. F:/boost_1_38_0/tools/build/v2/build\project.jam:313: 
    in load-jamfile  
  5. F:/boost_1_38_0/tools/build/v2/build\project.jam:62:
     in load  
  6. F:/boost_1_38_0/tools/build/v2/build\project.jam:168: 
    in project.find  
  7. F:/boost_1_38_0/tools/build/v2\build-system.jam:535: 
    in load  
  8. F:\boost_1_38_0\tools\build\v2/kernel\modules.jam:283: 
    in import  
  9. F:\boost_1_38_0\tools\build\v2/kernel/bootstrap.jam:138: 
    in boost-build  
  10. F:\boost_1_38_0\libs\python\example\boost-build.jam:7:
     in module scope 

The above code is to embed python in c ++-Bug modification and. the introduction of the jam file should be noted. It took me a long time to find it in mail lists of python. In mail lists of python. The solution is as follows:

Find the user-config.jam file in the boost \ boost_000038_0 \ tools \ build \ v2 \ directory, open

 
 
  1. import toolset : using ; 

Add a line of code below:

 
 
  1. using python ; 

Or directly add

 
 
  1. using python ; 

Re-compile the boost, and then there will be no problem. The hello in tutorial can be compiled successfully. Ps. This problem has plagued me for a long time. Sigh. In the jam file, change '\' in the path under Windows to '/' or '/'. In addition, each path must have spaces before and after, and, note This when modifying jam. The above is an introduction to how to embed Python in c ++ -- about Bug modification and related content in the. jam file. I hope you will gain some benefits.

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.