ãããã boost-python ã使ç¨ãã¦ãPython 㨠C è¨èªä¸¡æ¹ãæ´»ç¨ããæ¹æ³ã説æãã¦ãã¾ãã åè¨äºã§ã¯ãC è¨èªã§ Hello world ãåºåããé¢æ°ãä½æããããã Python ããå¼ã³åºãæ¹æ³ã説æãã¾ããã æ¬è¨äºã§ã¯ããµãã¤ã®è¨èªã®éã§ç°¡åãªãã¼ã¿ãåã渡ãæ¹æ³ã«ã¤ãã¦è§£èª¬ãã¾ãã ããªããã£ãã®åã渡ãã¯ç°¡å 渡ããããã¼ã¿ãæååãæ°å¤ã§ããå ´åã¯ãä½ãæ°å ¼ãããå¿ è¦ãããã¾ããã hello.cpp #include <string> #include <boost/python.hpp> using namespace boost::python; double increment(int x) { return x + 1; } std::string add_txt(std::string x) { return x + ".txt"; } B
{{#tags}}- {{label}}
{{/tags}}