Failed to build an application

Hello,

I failed to build an application from source. Can anyone help?

Code:
$ make
x11_clipboard.c:21:10: fatal error: 'X11/Xlib.h' file not found
*** Error code 2


$ make CXXFLAGS='-I/usr/local/include'
x11_clipboard.c:21:10: fatal error: 'X11/Xlib.h' file not found
*** Error code 2
 
Are you sure it's C++ (CXXFLAGS is for C++)? You probably need to set CFLAGS. But you really should fix this in the Makefile.
 
Yes, I have the file /usr/local/include/X11/Xlib.h. I added CFLAGS='-I/usr/local/include' in Makefile, and it still give the same error.
 
Strictly speaking, there are the 4 following make variables
  • CFLAGS for flags related to C compilation (e.g., -Wstrict-prototypes)
  • CXXFLAGS for flags related to C++ compilation (e.g., -fno-rtti)
  • CPPFLAGS for flags related to the preprocessor ofr both C and C++ compilation (e.g., -D and -I)
  • LDFLAGS for flags related to the linker driver (e.g., -L)

Can you show what compilation command make is running? And the corresponding rule from the makefile?
 
Hello,

I failed to build an application from source. Can anyone help?

Code:
$ make
x11_clipboard.c:21:10: fatal error: 'X11/Xlib.h' file not found
*** Error code 2


$ make CXXFLAGS='-I/usr/local/include'
x11_clipboard.c:21:10: fatal error: 'X11/Xlib.h' file not found
*** Error code 2
Is there any configure script or just the makefile alone?
 
Back
Top