New submission from Christian Rendina <christian.rend...@gmail.com>:

When linking any windows application with pythoncore built as a static library, 
such executable will automatically export all python c api functions and 
generate a static library.

Exporting functions from a static library is a strange behavour, as I am not 
aware of any reason why dllimport/export should be used when building a static 
library.

This behavour oncurrs because python's export.h doesn't know when the library 
is linked as shared or static.

I have attached a patch that should fix this issue.
Tested under Windows 10 + VS2019, a static linkage of Python3 does not produce 
any library file anymore, and such exports are no longer visible with 
Dependencies.

I would like to apology if I got any tag wrong, as it's my first issue here.

----------
components: Windows
files: prop.patch
keywords: patch
messages: 393377
nosy: lakor64, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Generation of an executable's library file when python is built is static
type: behavior
versions: Python 3.11
Added file: https://bugs.python.org/file50031/prop.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44101>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to