compile error on SWIG file

Markus von Ehr markus.vonehr at ipm.fhg.de
Tue Sep 10 06:05:49 EDT 2002


I put the file in the DLL directory.

In a pyhon shell I typed:

import mvelib
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in ?
    import mvelib
SystemError: _PyImport_FixupExtension: module mvelib not loaded


So python doesn't find the module, I guess?
Any ideas?

Markus

Markus von Ehr schrieb:
> 
> Hi Lyle,
> 
> thanks for your answer and your efforts!
> I changed everything to .cpp
> The first error has gone
> Now I have an error (translated from german):
> 
> mvelib.obj: error LNK2001: unresolved external symbol initmvelib
> build\temp.win32-2.1\Release\mvelib.lib : fatal error LNK1120: 1
> unresolved reference
> LINK : fatal error LNK1141: Creation error of export file
> error: command 'c:\Programme\VC98\BIN\link.exe' failed with exit status
> 1141
> 
> Markus
> 
> Markus von Ehr schrieb:
> >
> > Hi,
> >
> > compiling my c-file generated from SWIG
> > (swig -c -python -o mvelib.c mvelib.i)
> > with a setup-file, I receive the error:
> >
> > c:\programme\vc98\include\eh.h(32) : fatal error C1189: #Error: "eh.h
> > is only for C++!"
> >
> > Anybody knows what I have to change???
> >
> > Thanks Markus
> >
> > ****************************
> > setup.py
> > ****************************
> > from distutils.core import setup, Extension
> >
> > setup (name = "mvelib",
> >         version = "1.0",
> >         maintainer = "Markus von Ehr",
> >         maintainer_email = "markus.vonehr at ipm.fhg.de",
> >         description = "mvelib Python module",
> >
> >         ext_modules = [Extension('mvelib',sources=['mvelib.c'])]
> >  )



More information about the Python-list mailing list