It looks like the missing character libdl from libdl .
As an added bonus, I will give you a Makefile. Remember to indent with tabs, not spaces, otherwise the Makefile will not work.
all: out clean: rm -f out *.o .PHONY: all clean CXX = g++ CPPFLAGS = CXXFLAGS = -std=c++11 -Wall -Wextra -g LIBS = -lGL -lGLU -lglfw3 -lX11 -lXxf86vm -lXrandr -pthread -lXi -ldl LDFLAGS = out: main.o $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
However, it would be much easier if you used pkg-config . I do not know, from my point of view, the correct command (now I am not on Linux, so I can not check), but it will look like this:
packages = glfw3 CPPFLAGS := $(shell pkg-config --cflags $(packages)) LIBS := $(shell pkg-config --libs $(packages))
That way, you donβt even need to know that you need -ldl because pkg-config will figure this out for you. This is the standard way to do things.
Try running pkg-config --libs glfw3 to see the results. If it is not installed, run sudo apt-get install pkg-config .
source share