Ciao, ho scritto un piccolo eseguibile che embedda python per testare come si comporta una libreria in ambiente embedded:
http://code.google.com/p/py-setproctitle/source/browse/tests/pyrun.c Non ha dato problemi mentre avevo ubuntu 10.10. Passando a 11.10 non riesco più a compilarlo. Lo compilo con qualcosa tipo: gcc `python-config --cflags` `python-config --ldflags` -o pyrun pyrun.c ma al minimo, è sufficiente: gcc -I/usr/include/python2.7 -lpython2.7 -o pyrun pyrun.c Con Python 2.6 in Ubuntu 10.10, tutto ok. Quello che ottengo ora è: /tmp/ccRbsrk3.o: In function `main': pyrun.c:(.text+0x12): undefined reference to `Py_Initialize' pyrun.c:(.text+0x37): undefined reference to `PyRun_SimpleFileExFlags' pyrun.c:(.text+0x48): undefined reference to `Py_Finalize' Ma "gcc -E" mostra che le funzioni vengono definite, mentre "nm -D /usr/lib/libpython2.7.so" mostra che la libreria contiene i simboli richiesti. Quello che è cambiato è: Python 2.6.6 -> 2.7.2 gcc 4.4.5 -> 4.6.1 Qualcuno sa cosa può essere cambiato? -- Daniele Varrazzo - Develer S.r.l. http://www.develer.com _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python