On Thu, Apr 14, 2011 at 11:28 AM, Nathan Coulson <conat...@gmail.com> wrote:
> actually figured out a neat trick, mingw-w64 can link directly to the .dll. > gcc file.c python31.dll -o file.exe > > no .a needed. > > http://www.mingw.org/wiki/sampleDLL > > (have yet to find out if it actually works yet, but so far looks promising) Note the "If this method works for your application then there is usually no need for an import library.". Whether it works or not is often found the hard way (i.e. you won't have a linking error, but subtle bugs). Building a .a library is more stable in my experience (even in 32 bits). In any case, note the -DMS_WIN64 which is mandatory if you want to make it work (without this define, mingw will use the python headers for 32 bits, with pointers typedef defined for 32 bits pointers instead of 64 bits, which will not work very well :) ). cheers, David -- http://mail.python.org/mailman/listinfo/python-list