Skip to content

Limit the C++ version in the CMakeLists.txt #1

@systemofapwne

Description

@systemofapwne

Problem: When just running cmake & make, the compilation fails on my machine with various errors of type

error: reference to ‘byte’ is ambiguous

This happens in bitfile.cpp and srecfile.cpp. The reason is a clash of std::byte (as introduced in C++17) due to the using namespace std in the global namespace and the explicit typedef of byte in the bitfile.h/srecfile.h.

Solution/Workaround: Limit the C++ standard to e.g. C++11 by adding

set(CMAKE_CXX_STANDARD 11) to the CMakeLists.txt.

OS: Manjaro
Compiler: g++ (GCC) 11.1.0
cmake: cmake version 3.21.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions