I'm working on an exercice at school (Mac OSX), and would like to continue at home (Ubuntu 16.04). To do this project I need to use a library : Minilibx (https://github.com/ttshivhula/minilibx) I met a problem when I try to gcc. Here is what gcc tells me : "mlx_init.c:(.text+0x2c) : référence indéfinie vers « XShmQueryVersion »" (undefined reference in english). There are a lot of these error, for each library (even math.h). At school there is no problem when compiling, but at home it doesn't work.
I compile with this line :
gcc -Wall -Werror -Wextra -std=gnu99 -I. -g -lm -lGLEW -lglfw -lGL ${OBJS} minilibx/libmlx_Linux.a -o ${NAME}
With :
OBJS = ${SRC:%.c=%.o}
SRC = cub3d.c ${addprefix ${GNL_PATH}, $(GNL_FILE)} ${addprefix ${LIB_PATH}, $(LIB_FILE)}
GNL and LIB are my two personnal librairies.
I tried to change my way of compiling but I cannot find what's wrong.