Python论坛  - 讨论区

标题:[python-chinese] boost::python生成的*.dll文件不能import, why?我用的是vc8+python2.5

2007年07月13日 星期五 06:05

zhangbaocai_cug zhangbaocai_cug在tom.com
星期五 七月 13 06:05:46 HKT 2007

¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
ÏÂÃæÊÇDLLµÄ´úÂ룺
#include
#include python.hpp>
using namespace boost::python;



std::string strtmp;
char const* Recognise(const char* url)
{
 strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
 strtmp+=url;
 return strtmp.c_str(); 
}


BOOST_PYTHON_MODULE(TestBoost)
{
 def("Recognise", Recognise);
}






zhangbaocai_cug
2007-07-12
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/d1538615/attachment.htm 

[导入自Mailman归档:
http://www.zeuux.org/pipermail/zeuux-python]

2007年07月12日 星期四 15:24

Li Qingfeng liqfemail在gmail.com
星期四 七月 12 15:24:05 HKT 2007

ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£

ÔÚ07-7-13£¬zhangbaocai_cug <zhangbaocai_cug在tom.com> дµÀ£º
>
>  ¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
> PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
> ÏÂÃæÊÇDLLµÄ´úÂ룺
> #include
> #include python.hpp>
<i>> using namespace boost::python;
>
>
>
> std::string strtmp;
> char const* Recognise(const char* url)
> {
>  strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
>  strtmp+=url;
>  return strtmp.c_str();
> }
>
>
> BOOST_PYTHON_MODULE(TestBoost)
> {
>  def("Recognise", Recognise);
> }
>
>
>  ------------------------------
>  zhangbaocai_cug
> 2007-07-12
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/6e41f841/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年07月12日 星期四 15:27

Li Qingfeng liqfemail在gmail.com
星期四 七月 12 15:27:51 HKT 2007

»¶Ó­Äã¼ÓÈëµ½boost::pythonÂÛ̳£¬Ïà¹ØÎÊÌâ´ó¼Ò¿ÉÒÔÒ»ÆðÑо¿¡£
http://groups.google.com/group/boostpythoncn?hl=zh-CN

ÔÚ07-7-12£¬Li Qingfeng <liqfemail在gmail.com> дµÀ£º
>
> ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
> ¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£
>
> ÔÚ07-7-13£¬zhangbaocai_cug <zhangbaocai_cug在tom.com> дµÀ£º
> >
> >  ¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
> > PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
> > ÏÂÃæÊÇDLLµÄ´úÂ룺
> > #include
> > #include python.hpp>
<i>> > using namespace boost::python;
> >
> >
> >
> > std::string strtmp;
> > char const* Recognise(const char* url)
> > {
> >  strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
> >  strtmp+=url;
> >  return strtmp.c_str();
> > }
> >
> >
> > BOOST_PYTHON_MODULE(TestBoost)
> > {
> >  def("Recognise", Recognise);
> > }
> >
> >
> >  ------------------------------
> >  zhangbaocai_cug
> > 2007-07-12
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/117422b3/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年07月12日 星期四 15:41

Li Qingfeng liqfemail在gmail.com
星期四 七月 12 15:41:27 HKT 2007

ÎÒ°ÑÄãµÄ´úÂëÔÚ×Ô¼ºµÄµçÄÔÉϱàÒëÖ´ÐÐÁËÒ»±éûÓÐÎÊÌ⣬²»¹ýÎÒÊÇubuntu²Ù×÷ϵͳ£¬±àÒë³É.soÎļþ¡£
ÊDz»ÊÇÒòΪdllÎļþ²»ÔÚpythonµÄpathÏÂÃ棬ÊÔÊÔ°ÑËü·Åµ½ÄãÆô¶¯pythonÃüÁîµÄÎļþ¼ÐÏÂÃæ¡£

ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º
>
>  ÎÒÊÇimport TestBoost Ò²²»¶Ô
> IDLE 1.2
> >>> import TestBoost
>
> Traceback (most recent call last):
>   File "", line 1, in 
>     import TestBoost
> ImportError: No module named TestBoost
> >>>
>
>  ------------------------------
>  zhangbaocai_cug
> 2007-07-12
>  ------------------------------
>  *·¢¼þÈË£º* Li Qingfeng
> *·¢ËÍʱ¼ä£º* 2007-07-12 00:28:04
> *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> *³­ËÍ£º*
> *Ö÷Ì⣺* Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport,
> why?ÎÒÓõÄÊÇvc8+python2.5
>
> »¶Ó­Äã¼ÓÈëµ½boost::pythonÂÛ̳£¬Ïà¹ØÎÊÌâ´ó¼Ò¿ÉÒÔÒ»ÆðÑо¿¡£
> http://groups.google.com/group/boostpythoncn?hl=zh-CN
>
> ÔÚ07-7-12£¬ Li Qingfeng <liqfemail在gmail.com> дµÀ£º
> >
> > ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
> > ¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£
> >
> > ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º
> > >
> > >    ¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
> > > PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
> > >  ÏÂÃæÊÇDLLµÄ´úÂ룺
> > >  #include
> > > #include python.hpp>
<i>> > > using namespace boost::python;
> > >
> > >
> > >
> > >  std::string strtmp;
> > > char const* Recognise(const char* url)
> > > {
> > >  strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
> > >  strtmp+=url;
> > >  return strtmp.c_str();
> > > }
> > >
> > >
> > > BOOST_PYTHON_MODULE(TestBoost)
> > > {
> > >  def("Recognise", Recognise);
> > > }
> > >
> > >
> > >  ------------------------------
> > >  zhangbaocai_cug
> > >  2007-07-12
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > > python-chinese-request在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >
> >
> >
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/aa8e175f/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年07月12日 星期四 17:12

Li Qingfeng liqfemail在gmail.com
星期四 七月 12 17:12:48 HKT 2007

¹§Ï²Äã¸ã¶¨¡£
·¢ÏÖÔÚubuntuÏ¿ª·¢ÕæÊÇ·½±ã£¬²½Öè¼òµ¥ºÜ¶à°¡¡£

ÔÚ07-7-13£¬zhangbaocai_cug <zhangbaocai_cug在tom.com> дµÀ£º
>
>  ÕÒµ½´ð°¸ÁË£¬Òª°ÑTestBoost.dll ¸Ä³ÉTestBoost.pyd ¾Í¿ÉÒÔÁË£¬Õæ±ä̬°¡
> ¾ßÌåÇë¿´ÏÂÃæµÄÍøÒ³
> http://www.cppblog.com/jacky2019/archive/2007/06/26/25662.html
>
>  ------------------------------
>  zhangbaocai_cug
> 2007-07-12
>  ------------------------------
>  *·¢¼þÈË£º* Li Qingfeng
> *·¢ËÍʱ¼ä£º* 2007-07-12 00:41:55
> *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> *³­ËÍ£º*
> *Ö÷Ì⣺* Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport,
> why?ÎÒÓõÄÊÇvc8+python2.5
>
> ÎÒ°ÑÄãµÄ´úÂëÔÚ×Ô¼ºµÄµçÄÔÉϱàÒëÖ´ÐÐÁËÒ»±éûÓÐÎÊÌ⣬²»¹ýÎÒÊÇubuntu²Ù×÷ϵͳ£¬±àÒë³É.soÎļþ¡£
> ÊDz»ÊÇÒòΪdllÎļþ²»ÔÚpythonµÄpathÏÂÃ棬ÊÔÊÔ°ÑËü·Åµ½ÄãÆô¶¯pythonÃüÁîµÄÎļþ¼ÐÏÂÃæ¡£
>
> ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º
> >
> >   ÎÒÊÇimport TestBoost Ò²²»¶Ô
> >  IDLE 1.2
> > >>> import TestBoost
> >
> >  Traceback (most recent call last):
> >   File "", line 1, in 
> >     import TestBoost
> > ImportError: No module named TestBoost
> > >>>
> >
> >   ------------------------------
> >  zhangbaocai_cug
> >  2007-07-12
> >  ------------------------------
> >  *·¢¼þÈË£º* Li Qingfeng
> >  *·¢ËÍʱ¼ä£º* 2007-07-12 00:28:04
> >  *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> >  *³­ËÍ£º*
> >  *Ö÷Ì⣺* Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport,
> > why?ÎÒÓõÄÊÇvc8+python2.5
> >
> >  »¶Ó­Äã¼ÓÈëµ½boost::pythonÂÛ̳£¬Ïà¹ØÎÊÌâ´ó¼Ò¿ÉÒÔÒ»ÆðÑо¿¡£
> > http://groups.google.com/group/boostpythoncn?hl=zh-CN
> >
> > ÔÚ07-7-12£¬ Li Qingfeng <liqfemail在gmail.com> дµÀ£º
> > >
> > > ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
> > > ¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£
> > >
> > > ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º
> > > >
> > > >  ¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
> > > > PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
> > > > ÏÂÃæÊÇDLLµÄ´úÂ룺
> > > > #include
> > > > #include python.hpp>
<i>> > > > using namespace boost::python;
> > > >
> > > >
> > > >
> > > > std::string strtmp;
> > > > char const* Recognise(const char* url)
> > > > {
> > > >  strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
> > > >  strtmp+=url;
> > > >  return strtmp.c_str();
> > > > }
> > > >
> > > >
> > > > BOOST_PYTHON_MODULE(TestBoost)
> > > > {
> > > >  def("Recognise", Recognise);
> > > > }
> > > >
> > > >
> > > >  ------------------------------
> > > >  zhangbaocai_cug
> > > > 2007-07-12
> > > >
> > > > _______________________________________________
> > > > python-chinese
> > > > Post: send python-chinese在lists.python.cn
> > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > > Unsubscribe: send unsubscribe to
> > > > python-chinese-request在lists.python.cn
> > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > > >
> > >
> > >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/8fd462ce/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年07月13日 星期五 06:32

zhangbaocai_cug zhangbaocai_cug在tom.com
星期五 七月 13 06:32:49 HKT 2007

ÎÒÊÇimport TestBoost Ò²²»¶Ô 
IDLE 1.2      
>>> import TestBoost

Traceback (most recent call last):
  File "", line 1, in 
    import TestBoost
ImportError: No module named TestBoost
>>> 





zhangbaocai_cug
2007-07-12



·¢¼þÈË£º Li Qingfeng
·¢ËÍʱ¼ä£º 2007-07-12 00:28:04
ÊÕ¼þÈË£º python-chinese在lists.python.cn
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport, why?ÎÒÓõÄÊÇvc8+python2.5

»¶Ó­Äã¼ÓÈëµ½boost::pythonÂÛ̳£¬Ïà¹ØÎÊÌâ´ó¼Ò¿ÉÒÔÒ»ÆðÑо¿¡£
http://groups.google.com/group/boostpythoncn?hl=zh-CN


ÔÚ07-7-12£¬ Li Qingfeng <liqfemail在gmail.com> дµÀ£º
ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£


ÔÚ07-7-13£¬zhangbaocai_cug <zhangbaocai_cug在tom.com> дµÀ£º
¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
ÏÂÃæÊÇDLLµÄ´úÂ룺
#include
#include python.hpp>
using namespace boost::python;



std::string strtmp;
char const* Recognise(const char* url)
{
 strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
 strtmp+=url;
 return strtmp.c_str(); 
}


BOOST_PYTHON_MODULE(TestBoost)
{
 def("Recognise", Recognise);
}






zhangbaocai_cug
2007-07-12

_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn 
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/a81f9453/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年07月13日 星期五 06:51

zhangbaocai_cug zhangbaocai_cug在tom.com
星期五 七月 13 06:51:56 HKT 2007

ÎÒµÄÊÇÔÚwindowsÏÂÃ棬pathÒѾ­Éè¹ýÁË£¬ÓÃdepends²é¿´ÁËÒ»°ÑËùÓеÄÒÀÀµ¿â¶¼ÓУ¬¶øÇÒinitTestBoostº¯ÊýÒ²ÊÇC·ç¸ñµÄ£¬ÓÃpython2.4±àÒëµÄ¿ÉÒÔµ¼È룬µ«ÓÃpython2.5¾Í²»¿ÉÒÔ£¬ÄѵÀÊÇbug£¿
¿½±´µ½pythonĿ¼ÏÂÒ²²»¿ÉÒÔ




zhangbaocai_cug
2007-07-12



·¢¼þÈË£º Li Qingfeng
·¢ËÍʱ¼ä£º 2007-07-12 00:41:55
ÊÕ¼þÈË£º python-chinese在lists.python.cn
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport, why?ÎÒÓõÄÊÇvc8+python2.5

ÎÒ°ÑÄãµÄ´úÂëÔÚ×Ô¼ºµÄµçÄÔÉϱàÒëÖ´ÐÐÁËÒ»±éûÓÐÎÊÌ⣬²»¹ýÎÒÊÇubuntu²Ù×÷ϵͳ£¬±àÒë³É.soÎļþ¡£
ÊDz»ÊÇÒòΪdllÎļþ²»ÔÚpythonµÄpathÏÂÃ棬ÊÔÊÔ°ÑËü·Åµ½ÄãÆô¶¯pythonÃüÁîµÄÎļþ¼ÐÏÂÃæ¡£


ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º
ÎÒÊÇimport TestBoost Ò²²»¶Ô 
IDLE 1.2      
>>> import TestBoost

Traceback (most recent call last):
  File "", line 1, in 
    import TestBoost
ImportError: No module named TestBoost
>>> 





zhangbaocai_cug
2007-07-12



·¢¼þÈË£º Li Qingfeng
·¢ËÍʱ¼ä£º 2007-07-12 00:28:04
ÊÕ¼þÈË£º python-chinese在lists.python.cn
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport, why?ÎÒÓõÄÊÇvc8+python2.5

»¶Ó­Äã¼ÓÈëµ½boost::pythonÂÛ̳£¬Ïà¹ØÎÊÌâ´ó¼Ò¿ÉÒÔÒ»ÆðÑо¿¡£
http://groups.google.com/group/boostpythoncn?hl=zh-CN 


ÔÚ07-7-12£¬ Li Qingfeng <liqfemail在gmail.com> дµÀ£º 
ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£


ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º 
¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
ÏÂÃæÊÇDLLµÄ´úÂ룺
#include
#include python.hpp>
using namespace boost::python;



std::string strtmp;
char const* Recognise(const char* url)
{
 strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
 strtmp+=url;
 return strtmp.c_str(); 
}


BOOST_PYTHON_MODULE(TestBoost)
{
 def("Recognise", Recognise);
}






zhangbaocai_cug
2007-07-12

_______________________________________________ 
python-chinese
Post: send python-chinese在lists.python.cn 
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese






_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn 
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/f0bbe2f9/attachment-0001.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年07月13日 星期五 07:42

zhangbaocai_cug zhangbaocai_cug在tom.com
星期五 七月 13 07:42:24 HKT 2007

ÕÒµ½´ð°¸ÁË£¬Òª°ÑTestBoost.dll ¸Ä³ÉTestBoost.pyd ¾Í¿ÉÒÔÁË£¬Õæ±ä̬°¡
¾ßÌåÇë¿´ÏÂÃæµÄÍøÒ³
http://www.cppblog.com/jacky2019/archive/2007/06/26/25662.html




zhangbaocai_cug
2007-07-12



·¢¼þÈË£º Li Qingfeng
·¢ËÍʱ¼ä£º 2007-07-12 00:41:55
ÊÕ¼þÈË£º python-chinese在lists.python.cn
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport, why?ÎÒÓõÄÊÇvc8+python2.5

ÎÒ°ÑÄãµÄ´úÂëÔÚ×Ô¼ºµÄµçÄÔÉϱàÒëÖ´ÐÐÁËÒ»±éûÓÐÎÊÌ⣬²»¹ýÎÒÊÇubuntu²Ù×÷ϵͳ£¬±àÒë³É.soÎļþ¡£
ÊDz»ÊÇÒòΪdllÎļþ²»ÔÚpythonµÄpathÏÂÃ棬ÊÔÊÔ°ÑËü·Åµ½ÄãÆô¶¯pythonÃüÁîµÄÎļþ¼ÐÏÂÃæ¡£


ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º
ÎÒÊÇimport TestBoost Ò²²»¶Ô 
IDLE 1.2      
>>> import TestBoost

Traceback (most recent call last):
  File "", line 1, in 
    import TestBoost
ImportError: No module named TestBoost
>>> 





zhangbaocai_cug
2007-07-12



·¢¼þÈË£º Li Qingfeng
·¢ËÍʱ¼ä£º 2007-07-12 00:28:04
ÊÕ¼þÈË£º python-chinese在lists.python.cn
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]boost::pythonÉú³ÉµÄ*.dllÎļþ²»ÄÜimport, why?ÎÒÓõÄÊÇvc8+python2.5

»¶Ó­Äã¼ÓÈëµ½boost::pythonÂÛ̳£¬Ïà¹ØÎÊÌâ´ó¼Ò¿ÉÒÔÒ»ÆðÑо¿¡£
http://groups.google.com/group/boostpythoncn?hl=zh-CN 


ÔÚ07-7-12£¬ Li Qingfeng <liqfemail在gmail.com> дµÀ£º 
ÄÇÊÇÒòΪӦ¸ÃÊÇimport TestBoost²Å¶Ô¡£
¶¯Ì¬Á´½Ó¿âÎļþµÄÃû×Ö±ØÐëºÍBOOST_PYTHON_MODULE(TestBoost)Õâ¸öºê¶¨ÒåµÄÃû×ÖTestBoostÒ»Ö¡£


ÔÚ07-7-13£¬zhangbaocai_cug < zhangbaocai_cug在tom.com> дµÀ£º 
¿ÉÊÇÓÃboost::pythonÉú³ÉµÄ*.dllÎļþÈ´ÓÖ²»ÄÜimportÁË(IDLEºÍc++ÀïÃæimport¶¼Ê§°Ü).
PS:ÎÒ¶¼ÊÇÓÃrelease°æ±¾µÄ.
ÏÂÃæÊÇDLLµÄ´úÂ룺
#include
#include python.hpp>
using namespace boost::python;



std::string strtmp;
char const* Recognise(const char* url)
{
 strtmp ="´ÓdllÖзµ»ØµÄÊý¾Ý... : ";
 strtmp+=url;
 return strtmp.c_str(); 
}


BOOST_PYTHON_MODULE(TestBoost)
{
 def("Recognise", Recognise);
}






zhangbaocai_cug
2007-07-12

_______________________________________________ 
python-chinese
Post: send python-chinese在lists.python.cn 
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese






_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn 
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070712/31e99c14/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号