[New-bugs-announce] [issue24673] distutils/_msvccompiler does not remove /DLL during link(CCompiler.EXECUTABLE)

James Salter report at bugs.python.org
Mon Jul 20 13:05:19 CEST 2015


New submission from James Salter:

Encountered trying to build numpy with python 3.5b3, visual studio 2015.

>From distutils/_msvccompiler.py:MSVCCompiler.link:

        if self._need_link(objects, output_filename):
            ldflags = (self.ldflags_shared_debug if debug
                       else self.ldflags_shared)
            if target_desc == CCompiler.EXECUTABLE:
                ldflags = ldflags[1:]

But

        self.ldflags_shared = [
            '/nologo', '/DLL', '/INCREMENTAL:NO'
        ]
        self.ldflags_shared_debug = [
            '/nologo', '/DLL', '/INCREMENTAL:no', '/DEBUG:FULL'
        ]

Which leads to a DLL being created instead of a .exe.

I have attached a patch that explicitly removes '/DLL' rather than trimming by index.

----------
components: Distutils
files: _msvccompiler_link.patch
keywords: patch
messages: 246976
nosy: James Salter, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: distutils/_msvccompiler does not remove /DLL during link(CCompiler.EXECUTABLE)
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file39959/_msvccompiler_link.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24673>
_______________________________________


More information about the New-bugs-announce mailing list