pexports dlltool Syntax error in def file python27.def:0

687 views Asked by At

I don't manage to build libpythonX.a.

dlltool --dllname "python27.dll" --def "python27.def" --output-lib libpython27.a

I get the following error dlltool.exe: Syntax error in def file python27.def:0

I have been following the steps on http://sebsauvage.net/python/mingw.html, section 2.

I'm using MinGW32, python 32 bit.

Anyone have any ideas as to what I am missing?

1

There are 1 answers

2
Xianghai Liu On

python27.def is generated by pexports.exe. And the first line of python27.def is "LIBRARY python27.dll". dlltool does not use this line. So you must delete that line.