| inlinex :: cpp2xs. InLinex :: CPP2XS´Â ÀζóÀÎ C Äڵ忡¼ XS·Î º¯È¯ÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
inlinex :: cpp2xs. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~sisyphus/
inlinex :: cpp2xs. ű×
inlinex :: cpp2xs. ¼³¸í
INLINEX :: CPP2XS´Â ÀζóÀÎ C Äڵ忡¼ XS·Î º¯È¯ÇÏ´Â PERL ¸ðµâÀÔ´Ï´Ù. INLINEX :: CPP2XS´Â ÀζóÀÎ C Äڵ忡¼ xs.synopsis #usage·Î º¯È¯ÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. # cpp2xs ($ module_name, $ package_name ) inlinex :: cpp2xs qw (cpp2xs); my $ modual_name = 'my :: xs_mod'; ³» $ package_name = 'my :: xs_mod'; # $ build_dirÀº ¼±ÅÃÀû Á¦ 3 argÀÔ´Ï´Ù. # »ý·« µÈ °æ¿ì ±âº»°ªÀº '.' (CWD). MY $ BUILD_DIR = '/ ÀϺΠ/ ¾îµð¼ / else'; # $ config_opts´Â ¼±ÅÃÀûÀ¸·Î 4 arg (Çؽà ÂüÁ¶) ³» $ config_opts = { 'write_pm'=> 1, 'write_makefile_pl'=> 1, '¹öÀü'=> 0.42,}; # //some/wwhere/else/xs_mod.xs¿¡¼ ./src/xs_mod.cpp #Àº ÇØ´ç ÆÄÀÏÀÌ ¸ðµâÀ» ºôµåÇÏ´Â µ¥ ÇÊ¿äÇÑ °æ¿ì TypeMap ÆÄÀÏ /some/else/cpp.map #À» ÀÛ¼ºÇÕ´Ï´Ù. : CPP2XS ($ module_name, $ package_name, $ build_dir); # ¶Ç´Â CWD : CPP2XS ($ module_name, $ package_name)¿¡¼ xs_mod.xs (ÇÊ¿äÇÒ °æ¿ì cpp.map, ÇÊ¿ä½Ã)¸¦ ¸¸µì´Ï´Ù. ¼±ÅÃÀû ³× ¹ø° arg (Çؽÿ¡ ´ëÇÑ ÂüÁ¶)Àº ÀζóÀÎÀÌ ÇÊ¿äÇÒ ¼öÀÖ´Â Ãß°¡ Á¤º¸ ¹× ±¸¼º ¿É¼ÇÀ» Àü´ÞÇÒ ¼ö ÀÖÀ¸¸ç makefile.pl ¹× .pm ÆÄÀÏÀ» »ý¼º ÇÒ ¼ö ÀÖ½À´Ï´Ù (¿øÇÏ´Â °æ¿ì). ¾Æ·¡ÀÇ "ÀÎ½Ä µÈ Çؽà Ű"ÀýÀ» ÂüÁ¶ÇϽʽÿÀ. # cwd¿¡¼ xs_mod.xs¸¦ ¸¸µì´Ï´Ù. makefile.pl # ¹× xs_mod.pm : cpp2xs ($ module_name, $ package_name, $ config_opts); Âü°í : $ config_opts Àμö¸¦ Á¦°øÇÏÁö¸¸ $ build_dir Àμö°¡ ¾Æ´Ñ °æ¿ì $ build_dir Àμö¸¦ »ý·«ÇÕ´Ï´Ù. Áï, ´ÙÀ½Àº CPP2XS ($ module_name, $ package_name, '.', $ config_opts); CPP2XS ($ module_name, $ package_name, $ config_opts); ¼¼ ¹ø° Àμö°¡ ÁÖ¾îÁö¸é Çؽà ÂüÁ¶°¡ ¾Æ´Ñ ÇÑ ºôµå µð·ºÅ丮·Î °£Áֵ˴ϴ٠(ÀÌ °æ¿ì Ãß°¡ ±¸¼º ¿É¼ÇÀ» Æ÷ÇÔÇÏ´Â Çؽà ÂüÁ¶·Î °£Áֵ˴ϴÙ). ¿ä±¸ »çÇ× : ¡¤ Perl.
inlinex :: cpp2xs. °ü·Ã ¼ÒÇÁÆ®¿þ¾î