Skip to content

Build Error on Cygwin #2529

@rkaminsk

Description

@rkaminsk

Describe the bug
A clear and concise description of what the bug is.

I get the following error using gcc 11.3.0 on cygwin:

/cygdrive/c/projects/clingo/third_party/catch/src/catch2/../catch2/catch_tostring.hpp:214:33: error: there are no arguments to 'strnlen' that depend on a template parameter, so a declaration of 'strnlen' must be available [-fpermissive]
  214 |                 StringRef( str, strnlen( str, SZ ) ) );

What about using strnlen_s instead? The only problem I see is that additional macros would have to be defined but since the templates are fully instantiated, the required code could be moved to the source file.

There might also be another header providing a strnlen. I could dig a little deeper if help is required.

Platform information:

  • OS: Windows + Cygwin
  • Compiler+version: GCC v11.3.0
  • Catch version: v3.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions