2006年12月18日 星期一 14:59
hi,everyone: i have a simple question,but i don't know why,thanks for your help #includePython.h> #include usr/lib/python2.3/config/libpython2.3.a #libpython2.3.so located in /usr/lib/libpython2.3.so when compiled it like below(dynamic),it can work correctly, gcc -o test -lpython2.3 test.c while when compiled it like below(static),compile error gcc -o test -static -lpython2.3 test.c -L /usr/lib/python2.3/config why does error say: /tmp/ccSmBEW1.o(.text+0x1d): In function `main': : undefined reference to `Py_Initialize' ... but in fact my libpython2.3.a located in /usr/lib/python2.3/config/libpython2.3.a why?can anybody help me? __________________________________________________ ¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä? http://cn.mail.yahoo.com -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20061218/e6a253de/attachment.html#include int main(int argc,char **argv){ Py_Initialize(); PyRun_SimpleString("print 1+8"); Py_Finalize(); return 0; } # libpython2.3.a located in
Zeuux © 2025
京ICP备05028076号