Skip to content

find_library("c") defers to find_msvcrt() #72469

Closed as not planned
Closed as not planned

Description

@vadmium
BPO 28282
Nosy @pfmoore, @tjguk, @vadmium, @zware, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2016-09-27.01:27:44.977>
labels = ['ctypes', '3.7', 'OS-windows', 'docs']
title = 'find_library("c") defers to find_msvcrt()'
updated_at = <Date 2016-09-27.01:27:44.977>
user = 'https://github.com/vadmium'

bugs.python.org fields:

activity = <Date 2016-09-27.01:27:44.977>
actor = 'martin.panter'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation', 'Windows', 'ctypes']
creation = <Date 2016-09-27.01:27:44.977>
creator = 'martin.panter'
dependencies = []
files = []
hgrepos = []
issue_num = 28282
keywords = []
message_count = 1.0
messages = ['277479']
nosy_count = 6.0
nosy_names = ['paul.moore', 'tim.golden', 'docs@python', 'martin.panter', 'zach.ware', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue28282'
versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

Activity

  1. vadmium commented on Sep 27, 2016

    @vadmium
    MemberAuthor

    bpo-1793 added ctypes.util.find_msvcrt(), and special cases that map find_library("c") and "m" to the new function. However this contradicts the documentation <https://docs.python.org/3.5/library/ctypes.html#finding-shared-libraries\>:

    ‘On Windows, . . . a call like find_library("c") will fail and return None.’

    I think the documentation needs updating or clarifying.

  2. transferred this issue fromon Apr 10, 2022
  3. encukou commented on Feb 23, 2026

    @encukou
    Member

    I'm proposing to soft-deprecate ctypes.util.find_library: https://discuss.python.org/t/106232

  4. encukou commented on Mar 20, 2026

    @encukou
    Member

    As discussed in #67794, find_msvcrt itself will fail (with reasonably recent MSVC versions), so you will get None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions