From 68a1ae93add0fd6ace9a7cd60bb7090b7b5bbfdf Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Thu, 23 Jan 2020 15:51:57 +0100 Subject: Trying to close --- Makefile | 3 ++- src/main.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 15d76b3..38fbeca 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,8 @@ ${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}${INCS} -I${INCS_DIR} -o $@ $< #------------------------------------------------------------------------------# ${NAME}: ${OBJS} - ${CC} ${CFLAGS} -o $@ $< -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm + ${CC} ${CFLAGS} -o $@ $< -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm \ +-framework OpenGL -framework AppKit #------------------------------------------------------------------------------# all: @$(MAKE) --no-print-directory -C ${MLX_DIR} all diff --git a/src/main.c b/src/main.c index 84d7e23..6927b6d 100644 --- a/src/main.c +++ b/src/main.c @@ -2,14 +2,17 @@ #include #include -int main(void) { +int + main(void) +{ void *win; void *winptr; win = mlx_init(); winptr = (void*)malloc(800 * 600); winptr = mlx_new_window(win, 800, 600, "Cub3d"); - free(win); + mlx_loop(win); free(winptr); + free(win); return (0); } -- cgit v1.2.3