Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Reply-To: From: "Norman Vine" To: "'Darrell R. Hougen'" , Cc: Subject: RE: Problem building python extensions Date: Wed, 26 Sep 2001 14:57:57 -0400 Message-ID: <006d01c146bd$28be2dc0$a300a8c0@nhv> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2232.26 In-reply-to: <3BB21524.274E5ECD@lmco.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal Darrell R. Hougen writes: > >Unfortunately, I am still having problems. Norman, I followed your suggestion of using a >version of python that is built under cygwin. I downloaded python-2.1.1 and Numpy >20.2.1. Both built fine under my installation of cygwin. :-) >However, >when I attempt to compile my >code, I get the following error: > >$ make >gcc -g -Wall -Wshadow -DUSE_DL_IMPORT -I. >-I/usr/local/include/Python2.1 >-I/usr/local/include/Python2.1/Numeric -c -o Term.o Term.c >Term.c:429: initializer element is not constant >Term.c:429: (near initialization for `TermObjectType.ob_type') >make: *** [Term.o] Error 1 > >This is where ob_type is initialized with &PyType_Type, so the >error is very similar to >the one I was seeing before, i.e., the variable is not yet defined. With out seeing the actual code all I can do is guess the probelm however try changing the line PyObject_HEAD_INIT(&PyType_Type) to PyObject_HEAD_INIT(NULL) and then in your modules main initialization routine maybe init_term() ? add at the top of that function TermObjectType.ob_type = &PyType_Type; you can use any of the files in the modules directory to see how this is done for other extension types. If you still are having problems if you mail me < not the list > a link to or the src file itself I can see what I can do for you. Oh you probally will need change the signature of the main_init() function from void to DL_EXPORT(void) Cheers Norman -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/