X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48948F50.6A917ED0@dessent.net> Date: Sat, 02 Aug 2008 09:46:08 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: r CC: cygwin AT cygwin DOT com Subject: Re: Compile References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com r wrote: > I'm trying to compile a wonderful program ( command line ) to grab > videoes from youtube. It needs newt, a little utility. But when I try to > compile this utility I have the follewing errors : > ... > snackmodule.c:126: error: initializer element is not constant > snackmodule.c:126: error: (near initialization for `snackGridType.ob_type') > snackmodule.c:168: error: initializer element is not constant > snackmodule.c:168: error: (near initialization for `snackFormType.ob_type') > snackmodule.c:255: error: initializer element is not constant > snackmodule.c:255: error: (near initialization for `snackWidgetType.ob_type') > make: *** [_snackmodule_la-snackmodule.lo] Error 1 > > Do you know if it is an unrecoverable error ( a limitation of cygwin ) > that will not permit to install this utility ? In the future, you could save a lot of time on the part of people that might wish to help you by either pasting the contents of the above mentioned lines or providing a link to the source tarball. Or at the very least specify the version you're trying to build. Also, a proper subject usually helps. The offending construct is this: static PyTypeObject snackFormType = { PyObject_HEAD_INIT(&PyType_Type) PyType_Type is an object declared dllimport in Python.h as it's provided by the main python DLL. This is one of those differences between ELF and PE, the address of a symbol from a shared library cannot be used as a constant initializer in PE. The testcase boils down to this: $ cat >tc.c <