PDA

View Full Version : .pro file entry when including X11/Xlib.h



ravas
24th May 2016, 22:10
I'm trying to get the qTerminal .pro file working.
The latest error is:


qxtglobalshortcut_x11.o: undefined reference to symbol 'XStringToKeysym'
I see
#include <X11/Xlib.h> in qxtglobalshortcut_x11.cpp

I tried
INCLUDEPATH += /usr/include/X11
but that didn't work.

Does this require using LIBS?

https://github.com/lxde/qterminal/issues/229

anda_skoa
24th May 2016, 22:21
Does this require using LIBS?

Yes, "reference error" is a linker error, that means the compiler had already succeeded in compiling and thus in finding all includes.

Have you tried with CMake instead?
If that is the main build system then it is probably the one that is up to date.

Cheers,
_

ravas
24th May 2016, 22:36
No... >_<
Is there a way to use a cmake file like a pro file in Creator?

Edit: I just found http://doc.qt.io/qtcreator/creator-project-cmake.html

ChrisW67
24th May 2016, 23:04
I would think something like


LIBS += -L/usr/X11/lib -lX11

Is a good start. The path changes from system to system, and you may be able to get by without the -L option entirely. Have a look at the output of


pkg-config --cflags --lib x11

For more clues.

ravas
24th May 2016, 23:20
That did it. :D Thanks!

After that I also needed to add
QT += x11extras

https://github.com/r-a-v-a-s/qterminal/commit/5233e32794fd7d37b81b52ec44cd27de1adee0e8

anda_skoa
25th May 2016, 10:27
Is there a way to use a cmake file like a pro file in Creator?

Yes

Cheers,
_