Error compiling glfw

ive been trying to understand how to compile glfw and I am unable to figure out what to do i can only post one screenshot for some reason but this screenshot shows the errors and file locations

my tasks file looks like

// See

// for the documentation about the tasks.json format

"version": "2.0.0",

"tasks": [


        "label": "build",

        "type": "shell",

        "command": "g++",






            "2d render.cpp"




            "kind": "build",

            "isDefault": true




im using mingw g++ to compile my code

Hi @xxidk82xx,

Welcome to the GLFW forum!

See my reply here to another post on compiling with MinGW.

In short you need to link with the glfw3 library, and since you are using OpenGL you also need to link against opengl32.lib, you may also need to link against other Windows libraries explicitly as per the GLFW documentation.

To link a library with g++ this guide might be helpful.