Fredrik, On Wed, Feb 28, 2001 at 06:36:09PM +0100, Fredrik Lundh wrote:
tim indirectly wrote:
*** _sre.c 2001/01/16 07:37:30 2.52 --- _sre.c 2001/02/28 16:44:18 2.53 [snip]
after this change, the separate makefile I use to build _sre on Windows no longer works (init_sre isn't exported).
I don't really understand the code in config.h, but I've tried defining USE_DL_EXPORT (gives linking problems) and USE_DL_IMPORT (macro redefinition).
USE_DL_EXPORT is to be defined only when building the Win32 (and Cygwin) DLL core not when building extensions. When building Win32 Python, USE_DL_IMPORT is implicitly defined in PC/config.h when USE_DL_EXPORT is not. Explicitly defining USE_DL_IMPORT will cause the macro redefinition warning indicated above -- but no other ill or good effect. Another way to solve your problem without using the "/export:init_sre" link option is by patching PC/config.h with the attached. When I was converting Cygwin Python to use a DLL core instead of a static library one, I wondered why the USE_DL_IMPORT case was missing the following: #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE Anyway, sorry that I caused you some heartache. Jason P.S. If this patch is to be seriously considered, then the analogous change should be done for the other Win32 compilers (e.g. Borland). -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com