X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "bdurbin AT gmail DOT com" Newsgroups: comp.os.msdos.djgpp Subject: Howto create extensions for PythonD Date: 12 May 2006 13:26:05 -0700 Organization: http://groups.google.com Lines: 57 Message-ID: <1147465565.398297.52230@g10g2000cwb.googlegroups.com> NNTP-Posting-Host: 207.150.135.28 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1147465571 11777 127.0.0.1 (12 May 2006 20:26:11 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Fri, 12 May 2006 20:26:11 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse AT google DOT com Injection-Info: g10g2000cwb.googlegroups.com; posting-host=207.150.135.28; posting-account=8wKbqg0AAABXLK25HoMnXW-qj-Jghpv7 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com This may be a little off topic for this group, but I wasn't sure where else to go with the question. And since see Mr. Decker in here... I have PythonD, DJGPP and DXE3GEN up and working. My next step is that I need to create some Python extensions. Is there a Hello World type of example of this in the DJGPP environment? I've perused the stuff at the PythonD site and at http://www.python.org/doc/ext but I'm still left with questions regarding what the requirements are for the DJGPP environment. I've set up the following environment vars: set PATH=c:\djgpp\bin;%PATH% set DJGPP=c:\djgpp\djgpp.env SET PYTHONHOME = C:/PythonD SET PYTHONDIR = C:\PythonD SET LD_LIBRARY_PATH=/dev/env/DJDIR/lib SET PYTHONCASEOK=1 Is that what I should really have LD_LIBRARY_PATH set to? Or am I supposed to replace the /dev/env/DJDIR with C:\djgpp\lib? But when I try to build a simple extension I get the following: C:\EOL_P\test>C:\pythond\bin\python.exe setup.py build running build running build_ext c:/pythond/bin/Modules/Setup building 'hello' extension c:\djgpp\bin/gcc.exe -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DGLUT_IMPORT_LIB -Ic:/pythond/include/python2.4 -c hello_wrap.c -o build/temp.ms-dos-5-i786-2.4/hello_wrap.o In file included from c:/pythond/include/python2.4/Python.h:55, from hello_wrap.c:1: c:/pythond/include/python2.4/pyport.h:116:24: error: sys/select.h: No such file or directory (ENOENT) hello_wrap.c:3: warning: function declaration isn't a prototype hello_wrap.c:5: warning: function declaration isn't a prototype hello_wrap.c:17: warning: function declaration isn't a prototype NO PACKET DRIVER FOUND. error: command 'gcc.exe' failed with exit status 1 Now, I looked for select.h and couldn't find anything with that name. I'm assuming that either my environment isn't correct, or that I have to adjust something in the PythonD\lib\python2.4\config\Makefile. Problem is, I have no idea what that would be! Apologies for spamming on a noob support issue, but I never found an example of how to do extensions in the DJGPP environment. Any tips or pointers to examples or references would be greatly appreciated. Thanks a lot, Brent