Skip to content

error: ‘strcmp’ was not declared in this scope #10

Closed
@gdamjan

Description

@gdamjan

vulkan, glfw and glm installed from a package:

$ g++ -DNDEBUG -lvulkan -lglfw -std=c++11 hello_triangle.cpp 
hello_triangle.cpp: In member function ‘bool HelloTriangleApplication::checkValidationLayerSupport()’:
hello_triangle.cpp:823:64: error: ‘strcmp’ was not declared in this scope
                 if (strcmp(layerName, layerProperties.layerName) == 0) {
                                                                ^

adding #include <string.h> does compile it.

This is on ArchLinux, gcc-6.1.1, vulkan-headers-1.0.21, vulkan-intel 12.0.1 (mesa), glfw-x11 3.2-4, glm 0.9.7.5-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions