ANN: Pyrex 0.3.4

Brian Lenihan brian_l at yahoo.com
Thu Jul 18 02:03:52 EDT 2002


Robin Becker <robin at jessikat.fsnet.co.uk> wrote in message news:<BLhRFIAGTfN9Ew1y at jessikat.fsnet.co.uk>...
>
> I'm probably being stupid, but I get this with the Demos\setup.py using
> win32 2.2.1 after doing the base setup.py install
> 
> primes.c(141) : error C2375: 'initprimes' : redefinition; different
> linkage
>         primes.c(139) : see declaration of 'initprimes'
> error: command '"C:\Program Files\Microsoft Visual
> Studio\VC98\BIN\cl.exe"' failed with exit status 2

It's not you. MSVC doesn't like the void initprimes
prototype above the

__declspec(dllexport)
void initprimes(void) {

You can work around it by inverting the order in
Pyrex/Compiler/Nodes.py like so: 

header = "void init%s(void)" % env.module_name
if sys.platform == "win32":
    code.putln("__declspec(dllexport)")
else:
    code.putln("%s; /*proto*/" % header)



More information about the Python-list mailing list