Python论坛  - 讨论区

标题:[python-chinese] 关于在C程序中调用Python的问 题

2006年10月19日 星期四 09:57

刘鑫 march.liu在gmail.com
星期四 十月 19 09:57:58 HKT 2006

´ÓÔ´´úÂëÀ´¿´£¬ËûµÄÕâ¸ö.cµ¹ÊǵصÀµÄ±ê×¼c£¬Ò»¸öC++µÄÌØÓÐÔªËض¼Ã»ÓС£°´Ëµgcc¿ÉÒÔ±àÒëµÃ¸üºÃ°É¡£

2006/10/19, Jin Qing <jinq0123在163.com>:
>
>
> ÎÒÓÃ
> g++ testpy.cpp -I/usr/include/python2.2 -L/usr/lib/python2.2/config -
> lpython2.2 -lpthread -ldl -lutil
>
> ¿ÉÒÔͨ¹ý£¬µ«Óо¯¸æ£º
> g++ testpy.C -I/usr/include/python2.2 -L/usr/lib/python2.2/config -
> lpython2.2 -l
> /usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x3977): In
> funct:
> : the use of `tmpnam_r' is dangerous, better use `mkstemp'
> /usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x385e): In
> funct:
> : the use of `tempnam' is dangerous, better use `mkstemp'
>
> ÔËÐÐʱÓдíÎó£¬ÊÇPython importʱµÄ´íÎ󣬸ÄΪһ¸ö"print 'Hello world!'"¾Í¿ÉÒÔÁË¡£
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: /usr/lib/python2.2/lib-dynload/timemodule.so: undefined
> symbol: Pyg
>
> ÎÒÊÔµÄÊÇPython2.2µÄ¡£
>
> ÁíÍ⣬*.CÎļþÊÇC++Ô´³ÌÐò£¬Ó¦¸ÃÓÃg++µÄ£¬gcc²»ÄܱàÒë¡£
>
>
> ½ðÇì http://blog.csdn.net/jq0123
> 2006-10-19
>
>
> ======= 2006-10-18 14:01:00 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======
>
> >ÄãµÄÎÊÌâÆäʵºÍ python ±¾ÉíÎÞ¹Ø. Äã×îºÃ¾Í½üÕÒÒ»¸ö×ÊÉîµÄ Linux ³ÌÐòÔ±ÇóÖú¡£ÎÒÏÖÔÚÖ»¿´³öÉÙÁË -ldl -lpthread
> -lutil
> >
> >
> >ÁíÍâÄãÓà g++ ¶ø²»ÊÇ gcc Ò²ºÜÆæ¹Ö.
> >_______________________________________________
> >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




-- 
»¶Ó­·ÃÎÊ£º
http://blog.csdn.net/ccat

ÁõöÎ
March.Liu
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061019/f4f4f13d/attachment.htm 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号