FAQ
Hi,

After rediscovering compile.py by David, I am on the way to compiling
some addin modules.
One of the things that I really want to check out is Konrad's
netCDFmodule. When I attempt to compile it, I get following error.

--------------------Configuration: netcdf - Win32
Release--------------------
Compiling...
netcdfmodule.c
H:\Python\netCDFmodule\netcdfmodule.c(780) : error C2491:
'PyNetCDFFile_Type' : definition of dllimport data not allowed
H:\Python\netCDFmodule\netcdfmodule.c(1647) : error C2491:
'PyNetCDFVariable_Type' : definition of dllimport data not allowed
Error executing cl.exe.

demo.dll - 2 error(s), 0 warning(s)
(780)----
statichere PyTypeObject PyNetCDFFile_Type = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"NetCDFFile", /*tp_name*/
sizeof(PyNetCDFFileObject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)PyNetCDFFileObject_dealloc, /*tp_dealloc*/
0, /*tp_print*/
(getattrfunc)PyNetCDFFile_GetAttribute, /*tp_ge

(1647)
statichere PyTypeObject PyNetCDFVariable_Type = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"NetCDFVariable", /*tp_name*/
sizeof(PyNetCDFVariableObject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)PyNetCDFVariableObject_dealloc, /*tp_dealloc*/
0, /*tp_print*/
(getattrfunc)PyNetCDFVariable_GetAttribute, /*tp_getattr*/
(setattrfunc)PyNetCDFVariable_SetAttribute, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
0, /*tp_as_number*/

First of all I have no idea what statichere is, but I have it 3 places
and have two errors. If anyone have any idea what the problem is pls let
me know. I know couple of people have been trying to compile this on NT.
I think I am pretty close to it.
Thanks,

--

*****************************************************************************
S. Hoon Yoon (Quant) Merrill Lynch Equity Trading,
yelled at yahoo.com hoon at bigfoot.com(w)
"Miracle is always only few standard deviations away, but so is
catastrophe."
* Expressed opinions are often my own, but NOT my employer's.
"I feel like a fugitive from the law of averages." Mauldin
*****************************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcard.vcf
Type: text/x-vcard
Size: 193 bytes
Desc: Card for Hoon Yoon
Url : http://mail.python.org/pipermail/python-list/attachments/19990527/bd9f3da7/attachment.vcf

Search Discussions

  • Gordon McMillan at May 28, 1999 at 3:00 am

    Hoon Yoon writes:

    After rediscovering compile.py by David, I am on the way to
    compiling
    some addin modules.
    One of the things that I really want to check out is Konrad's
    netCDFmodule. When I attempt to compile it, I get following error.

    --------------------Configuration: netcdf - Win32
    Release--------------------
    Compiling...
    netcdfmodule.c
    H:\Python\netCDFmodule\netcdfmodule.c(780) : error C2491:
    'PyNetCDFFile_Type' : definition of dllimport data not allowed /snip/
    demo.dll - 2 error(s), 0 warning(s)
    (780)----
    statichere PyTypeObject PyNetCDFFile_Type = {
    PyObject_HEAD_INIT(NULL)
    0, /*ob_size*/
    "NetCDFFile", /*tp_name*/
    sizeof(PyNetCDFFileObject), /*tp_basicsize*/
    0, /*tp_itemsize*/
    /* methods */
    (destructor)PyNetCDFFileObject_dealloc, /*tp_dealloc*/
    0, /*tp_print*/
    (getattrfunc)PyNetCDFFile_GetAttribute, /*tp_ge
    Without looking any closer, I'd say that statichere is a #define. It
    is apparently trying to #define __declspec(__dllimport), which
    doesn't make sense.

    __declspec(__dllimport) would generally be used in a header that is
    declaring stuff implemented in a dll. __declspec(__dllexport) would
    make slightly more sense here (declaring that this is something to
    be exported from the dll), except that the only thing that should
    need that is the initcdfmodule function. Python goes around the OS
    and get's it's own pointers to everything else it needs.

    This is one major difference between .so's and .dll's. The former
    export everything that would be visible in a plain .o, the latter
    only exports things explicitly marked for export. Since the module
    was written by a known *nixen <wink>, you may have to mess with the
    #define a bit.

    - Gordon
  • Konrad Hinsen at Jun 1, 1999 at 8:52 am

    Hoon Yoon <hyoon at bigfoot.com> writes:

    After rediscovering compile.py by David, I am on the way to compiling
    some addin modules.
    One of the things that I really want to check out is Konrad's
    netCDFmodule. When I attempt to compile it, I get following error.
    Please try the alpha release of ScientificPython 2.0, which contains
    a modified netCDF interface. This has been compiled under Windows.
    The URL is ftp://dirac.cnrs-orleans.fr/pub/ScientificPython-2.0a5.tar.gz
    --
    -------------------------------------------------------------------------------
    Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr
    Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
    Rue Charles Sadron | Fax: +33-2.38.63.15.17
    45071 Orleans Cedex 2 | Deutsch/Esperanto/English/
    France | Nederlands/Francais
    -------------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 27, '99 at 6:37p
activeJun 1, '99 at 8:52a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase