user1978333
user1978333

Reputation: 127

Compiling VXL in Mac OS 10.8.2, X11/Xlib.h not found

I am trying to install the VXL, when I typed in "make -j1", I got this

[ 10%] Building C object v3p/netlib/examples/CMakeFiles/netlib_showme.dir/showme.o
/Users/viviantung/downloads/vxl-1.17.0/v3p/netlib/examples/showme.c:106:10: fatal error: 
  'X11/Xlib.h' file not found
#include <X11/Xlib.h>
     ^
1 error generated.
make[2]: *** [v3p/netlib/examples/CMakeFiles/netlib_showme.dir/showme.o] Error 1
make[1]: *** [v3p/netlib/examples/CMakeFiles/netlib_showme.dir/all] Error 2
make: *** [all] Error 2

What should I do? I already have XQuartz installed. Thanks.

Upvotes: 1

Views: 2134

Answers (3)

Abhimanu Kumar
Abhimanu Kumar

Reputation: 1791

A brute force way to solve this problem if all else fails is to define CXXFLAGS or CFLAGS in your environment.

Add

export CFLAGS="-I/opt/X11/include"

or

export CXXFLAGS="-I/opt/X11/include"

depending on c or c++ compiler into your ~/.bashrc or ~/.bash_profile and then rerun.

Upvotes: 0

userfx
userfx

Reputation: 1

  1. download vxl-1.14.0
  2. create a folder named vxl, extract the vxl-1.14.0.zip in vxl, also create a folder named bin under vxl folder.
  3. make sure you installed cmake and xquartz.
  4. open terminal, cd in the path of bin folder you created and typed ccmake /User/..../vxl/vxl-1.14.0 press c until you can press g to generate. then press g, and press q to quit.
  5. under bin folder typed make -j2 -k

hope you can build it successfully.

Upvotes: 0

user405725
user405725

Reputation:

X11 header files are located under /usr/X11R6/include directory. What you need to do is ask the compiler to search there by using -isystem /usr/X11R6/include command line option. Or, if you are using CMake, use include_directories("/usr/X11R6/include").

Upvotes: 1

Related Questions