Minilibx is a very basic graphical library written in C used in 42 and in Epitech for infography project.
- apt-get update
- apt-get upgrade
- apt install libx11-dev
- apt install libxext-dev
- apt install libbsd-dev
- apt install clang
git clone https://github.com/42Paris/minilibx-linux minilibx_linux
- cd minilibx_linux; make && sudo ./configure
- MLXFLAG = -lmlx -lXext -lX11
* install ubuntu terminal (or other distribution linux ) on windows 10 from windows store
* do the previous steps + you have to install gcc and make
to run graphical programs on your windows 10 desktop
you need a GUI server, such as X11. Such doesn’t not exist for Windows,
but there are alternatives, one of which is Xming, which can be downloaded
free of charge, from SourceForge (set private when ask)
then enable bash to use xming which can be done by typing the following line
echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
its preferable to launch xming automatically after boot, move xming program to the following repo:
- C:\Users\login\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
- after adding variables such DISPLAY, open a new bash session by typing
bash
or
source ~/.bashrc
- the process is explained using bash shell, you should modify it by whatever shell you are using (zsh, sh, ..)
- for events management, the mask should be (1L << 0) instead of 0
mlx_hook(p.win_ptr, 2, (1L << 0), ft_event_keys, &p);
- to simplify the usage of keys macros in mac os and linux, include key_macos.h and key_linux.h files:
# if defined(__APPLE__)
# include <key_macos.h>
# else
# include <key_linux.h>
# endif
based on alpine: ilkou/minilibx
or ilkou/minilibx:1.0.0
based on ubuntu: ilkou/minilibx:ubuntu