I'm pretty new to this so please don't be too harsh if the error is something really simple. I am trying to compile GLFW from their official repository using premake, but every single time it returns the following error:
"==== Building glfw (debug) ===="
"context.c"
process_begin: CreateProcess(NULL, cc -MD -MP -D_GLFW_WIN32 -D_CRT_SECURE_NO_WARNINGS -g -o obj/glfw/debug/context.o -MF obj/glfw/debug/context.d -c src/context.c, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [glfw.make:170: obj/glfw/debug/context.o] Error 2
make: *** [Makefile:30: glfw] Error 2
The command used is just make
I've been researching this for days but I'm not sure if it's some obscure error only one guy from like 10 years ago had or I just didn't type in the right thing, but I couldn't find any fix. I expected GLFW just to compile without any errors. My premake5.lua file is:
workspace "glfw"
configurations { "debug", "release" }
project "glfw"
kind "ConsoleApp"
language "C"
targetdir("bin/glfw/")
objdir("obj/glfw/")
files
{
"include/GLFW/glfw3.h",
"include/GLFW/glfw3native.h",
"src/context.c",
"src/init.c",
"src/input.c",
"src/monitor.c",
"src/null_init.c",
"src/null_joystick.c",
"src/null_monitor.c",
"src/null_window.c",
"src/platform.c",
"src/vulkan.c",
"src/window.c",
"src/win32_init.c",
"src/win32_joystick.c",
"src/win32_module.c",
"src/win32_monitor.c",
"src/win32_time.c",
"src/win32_thread.c",
"src/win32_window.c",
"src/wgl_context.c",
"src/egl_context.c",
"src/osmesa_context.c"
}
defines
{
"_GLFW_WIN32",
"_CRT_SECURE_NO_WARNINGS"
}
filter "configurations:debug"
runtime "Debug"
symbols "on"
I generated Makefile with the command premake5 gmake2 which ran successfully with this output:
Building configurations...
Running action 'gmake2'...
Generated glfw.make...
Done (43ms).
I'm using VSCode 1.85.2 as my editor of choice and GNU Make 4.2.1. Thanks in advance!