Annoying warnings, linking any embedded application

François Pinard pinard at iro.umontreal.ca
Tue Aug 13 08:40:33 EDT 2002


Hello, people.

I have annoying linker warnings each time I prepare a Python application
embedded within C, and I wonder if one of you would not know some simple
trick by which these warnings could be avoided. :-) Here is an example:

---------------------------------------------------------------------->
gcc -g -I/usr/include/python2.2 -o explore explore.c -Xlinker -export-dynamic -L/usr/lib/python2.2/config -lpython2.2 -ldl -lpthread -lutil -lm
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function `posix_tmpnam':
/usr/tmp/Python-2.2.1/./Modules/posixmodule.c:4501: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function `posix_tempnam':
/usr/tmp/Python-2.2.1/./Modules/posixmodule.c:4451: the use of `tempnam' is dangerous, better use `mkstemp'
----------------------------------------------------------------------<

This is using Python 2.2.1 on Linux SuSE 8.0, in case it matters.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list