I am having issues compiling a project. I believe I need to include the XTest.h file but I don’t have in my X11 directory.
This is a side project to help me learn how to manage dependencies, build, compile and troubleshoot errors.
g++ -L robot-master/Binaries/Linux/libRobot.a main.cpp -lRobot -lX11
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XTestQueryExtension'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XineramaQueryScreens'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XineramaIsActive'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XTestFakeButtonEvent'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XTestFakeKeyEvent'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XTestGrabControl'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libRobot.so: undefined reference to `XineramaQueryVersion'
collect2: error: ld returned 1 exit status
XTest.h
sudo apt-get install libxtst-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxtst-dev is already the newest version (2:1.2.3-1build4).
The following packages were automatically installed and are no longer required:
libwpe-1.0-1 libwpebackend-fdo-1.0-1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Recommended libraries for package installs
sudo apt-get install libxt-dev libxtst-dev libxinerama-dev -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxinerama-dev is already the newest version (2:1.1.4-3).
libxt-dev is already the newest version (1:1.2.1-1).
libxtst-dev is already the newest version (2:1.2.3-1build4).
The following packages were automatically installed and are no longer required:
libwpe-1.0-1 libwpebackend-fdo-1.0-1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.