Skip to content

Build error in conpty.h due to undefined bool identifier #20030

@gcrtnst

Description

@gcrtnst

Windows Terminal version

No response

Windows build number

10.0.19045.7058

Other Software

No response

Steps to reproduce

  1. Install the Microsoft.Windows.Console.ConPTY nupkg (including the fixes from Fix MSB4019 error in ConPTY nupkg #20029) into a Visual C++ project.
  2. Include <conpty.h> in your source code.
  3. Attempt to build the project.

Expected Behavior

The project builds successfully without any errors.

Actual Behavior

The following build errors occur:

Severity Code Description File Line
Error (active) E0020 identifier "bool" is undefined ...\inc\conpty.h 45
Error C2146 syntax error: missing ')' before identifier 'show' ...\inc\conpty.h 45
Error C2081 'bool': name in formal parameter list illegal ...\inc\conpty.h 45
Error C2061 syntax error: identifier 'show' ...\inc\conpty.h 45
Error C2059 syntax error: ';' ...\inc\conpty.h 45
Error C2059 syntax error: ')' ...\inc\conpty.h 45

Reference: conpty-static.h#L45

In C (prior to C23), bool is not a built-in type.

Could you please update the function prototype for ConptyShowHidePseudoConsole? Or is it expected that we should manually include <stdbool.h> before including <conpty.h>?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions