0

I tried building GLFW3 under Ubuntu 15.10 using the tutorial here, and while that seems successful, I can't compile a sample program (provided by GLFW) using the command:

g++ test.cpp -lglfw3 -lGL

I get the following error.

/usr/bin/ld: /usr/local/lib/libglfw3.a(x11_window.c.o): undefined reference to symbol 'XConvertSelection'
/usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I tried including a bunch of different files in the linker, but thes two I have now took away all the other errors except these. I also read that the DSO missing error might indicate the wrong order of linked files, but changing the order doesn't help here. Probably missing some include, but no idea which. If anyone can help, it'd be greatly appreciate. I'm quite new to Linux, so this is beyond my current skills.

Community
  • 1
  • 1
anvoice
  • 295
  • 2
  • 7

1 Answers1

0

You need to get the packages. Run in the right order.

pkg-config --static --libs x11 xrandr xi xxf86vm glew glfw3
Nejc Galof
  • 2,538
  • 3
  • 31
  • 70