by taneliv · 11y ago · 0 comments
On Ubuntu includes are apparently broken, complaining about strings.h included from Xlibint.h ...
There's probably a yak to shave in that. However, if you're lazy and hit the same problem, you can compile a functional sct by lifting declarations of i and c outside their loops and dropping "-std=c99" from the command line.
#include <stdio.h>
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdarg.h>
#include <math.h>
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>Or maybe it's a similar situation but actually related to "feature test macros" (see https://lwn.net/Articles/590381/)