GLEW and glfw compile error: undefined reference to symbol 'XConvertSelection'

后端 未结 2 1505
轻奢々
轻奢々 2020-12-19 15:14

I\'m trying to compile this code:

#include 
#include 

#include 

#include 
GLFWwindow* w         


        
相关标签:
2条回答
  • 2020-12-19 16:09

    Ok, after some research I found that the DSO error which I got means that the order of the includes I've implemented is incorrect and cause the compilation to fail.

    So what I did is I used the command:

    pkg-config --static --libs x11 xrandr xi xxf86vm glew glfw3
    

    To get the packages I need for them to run and in the right order.

    Then I compiled the project accordingly. That's it :)

    0 讨论(0)
  • 2020-12-19 16:09

    I got same error "undefined reference to symbol 'XConvertSelection'" while compiling example from Irrlicht 3D, solved by adding "-lX11".

    Then I got error "undefined reference to symbol 'XF86VidModeGetGamma'", solved by adding "-lXxf86vm"

    0 讨论(0)
提交回复
热议问题