VC++ grrhhh
Robin Becker
robin at jessikat.demon.co.uk
Thu Sep 23 18:08:24 EDT 1999
In message <1274013533-173990 at hypernet.com>, Gordon McMillan
<gmcm at hypernet.com> writes
>Robin Becker writes:
>
>> anyone know how to get round nonconstant initialiser errors from
>> VC++ with the construction
>>
>> statichere PyTypeObject Arraytype = {
>> PyObject_HEAD_INIT(&PyType_Type) // error here
>> 0,
>> "array",
>>
>> when trying to compile as a separate module. Certainly
>> PyType_Type is defined in another dll, but it's just an extern
>> right or has M$ started fiddling with C semantics again? I have
>> tried declaring as an import, but that doesn't work either. --
>
>Actually, this is the MS trick of taking specs literally where
>everyone else lets them slide.
>
>Either rename the file to ".cpp" or declare the pointer as NULL
>and assign it later.
>
>- Gordon
yep thanks; adding /TP to the flags has apparently done it. Externs have
no address yeM$
--
Robin Becker
More information about the Python-list
mailing list