here's my code:
#include <iostream>#include <GLFW/glfw3.h>int main(void){ GLFWwindow* window; if(!glfwInit()){ std::cout << "Failed to initialize GLFW!" << std::endl; return -1; } window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL); if(!window){ glfwTerminate(); std:: cout << "Failed to initialize Window!" << std::endl; return -1; } glfwMakeContextCurrent(window); while(!glfwWindowShouldClose(window)){ glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwPollEvents(); } glfwTerminate(); return 0;}I successfully linked it and compile, but I'm having a runtime errorit says that glfw failed to initialize.I tried to use glfw in C but this error shows
Wayland: Failed to connect to displayThe GLFW library is not initializedmain: ./src/posix_thread.c:64: _glfwPlatformGetTls: Assertion `tls->posix.allocated == GLFW_TRUE' failed.Aborted (core dumped). I'm using popOS 22.04 LTS, I'm new to c++ and glfw pls help me fix this problem