undefined reference to symbol 'XF86VidModeQueryExtension' (linux, qt creator IDE)

╄→гoц情女王★ 提交于 2019-12-01 20:24:27

The problem is here:

LIBS += -lXxf86vm -L/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1
LIBS += -lXxf86vm -L/user/lib/x86_64-linux-gnu/libXxf86vm.so
LIBS += -lXxf86vm -L/user/lib/x86_64-linux-gnu/libXxf86vm.a
LIBS += -lXxf86vm -L/user/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0

You are using the -L option with a file name rather than a path! You should change those four lines to:

LIBS += -lXxf86vm -L/user/lib/x86_64-linux-gnu/

Secondly, if the ordering matters, you would need to use LIBS for glfw3, too, something like this:

LIBS += -lglfw3 -lXxf86vm -L/user/lib/x86_64-linux-gnu/

Do not forget to assign the glfw3 path as well if needed. That is depending on your setup. You could probably try to swap the order of your current PKGCONFIG and LIBS statements, but it is not that much future proof if you move code around. Also, if you can share the path between the two libraries, I would not personally use PKGCONFIG, just LIBS.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!