before the code was comiled no errors were there but once I compiled it there were some errors
code:
#include </Users/stavanmukherjee/Downloads/raylib-master/src/external/glfw/include/GLFW/glfw3.h>
#include <iostream>
int main() {
// Initialize the GLFW library
if (!glfwInit()) {
std::cerr << "Failed to initialize GLFW" << std::endl;
return -1;
}
// Set GLFW options
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// Create a windowed mode window and its OpenGL context
GLFWwindow* window = glfwCreateWindow(800, 600, "Hello World", nullptr, nullptr);
if (!window) {
std::cerr << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
// Make the window's context current
glfwMakeContextCurrent(window);
// Main loop
while (!glfwWindowShouldClose(window)) {
// Render here
// Swap front and back buffers
glfwSwapBuffers(window);
// Poll for and process events
glfwPollEvents();
}
// Clean up and exit
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}
errors:
Undefined symbols for architecture arm64:
"_glfwCreateWindow", referenced from:
_main in main.o
"_glfwDestroyWindow", referenced from:
_main in main.o
"_glfwInit", referenced from:
_main in main.o
"_glfwMakeContextCurrent", referenced from:
_main in main.o
"_glfwPollEvents", referenced from:
_main in main.o
"_glfwSetErrorCallback", referenced from:
_main in main.o
"_glfwSwapBuffers", referenced from:
_main in main.o
"_glfwTerminate", referenced from:
_main in main.o
_main in main.o
"_glfwWindowHint", referenced from:
_main in main.o
_main in main.o
_main in main.o
"_glfwWindowShouldClose", referenced from:
_main in main.o
ld: symbol(s) not found for architecture arm64