Giter Site home page Giter Site logo

minilibx-linux's People

Contributors

abaurens avatar aerosfilis avatar agagniere avatar agavrel avatar alexandregv avatar amalliar avatar angelofrangione avatar aurelien-brabant avatar bgenia avatar ggjulio avatar jbelinda avatar lsoulier42 avatar michaelgiraldo avatar mohamedhaddi avatar nbdy-coder avatar rashoru-infinity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minilibx-linux's Issues

License of the code

Hi! I would like to know the license and terms of use of the library, so I can choose a license for my program that links to it

mlx_new_window segfault, mlx_init returns 0

Hi !

My code :

int main(int ac, char **av)
{
void *mlx;
void *win;

(void)ac;
(void)av;
mlx = mlx_init();
win = mlx_new_window(mlx, 1920, 1080, "Hello world!");
mlx_loop(mlx);

}

makefile commands :
gcc -Wall -Wextra -Werror -O3 -c test.c -o test.o
gcc -o test test.o lib/libmlx_Linux.a lib/libft.a -L/usr/lib -lXext -lX11 -lm -lz

I do valgrind ./test
It returns :
==4182== Process terminating with default action of signal 11 (SIGSEGV)
==4182== Access not within mapped region at address 0x20
==4182== at 0x10CA33: mlx_new_window (in /mnt/c/Users/nicol/OneDrive/Bureau/projets/fdf/test)
==4182== by 0x10A697: main (in /mnt/c/Users/nicol/OneDrive/Bureau/projets/fdf/test)
==4182== If you believe this happened as a result of a stack
==4182== overflow in your program's main thread (unlikely but
==4182== possible), you can try to increase the size of the
==4182== main thread stack using the --main-stacksize= flag.
==4182== The main thread stack size used in this run was 8388608.

Any idea ?

'mlx-test' failed -> no information on why

gcc -o mlx-test main.o -L.. -lmlx -L/usr/include/../lib -lXext -lX11 -lm -lbsd
/usr/bin/ld: cannot find -lbsd
collect2: error: ld returned 1 exit status
Makefile.gen:20: recipe for target 'mlx-test' failed
make[1]: *** [mlx-test] Error 1
make[1]: Leaving directory '/home/st4ck/projects/42-fdf/libmlx/test'
Makefile:17: recipe for target 'do_configure' failed
make: *** [do_configure] Error 2

man/man1 directory identicall to man/man3

the two directories man/man1 and man/man3 contains the sames pages, that end in .1, so are found under a man mlx research for exemple, but seems to be made for a man 3 mlx search (since the top of the man page says explicitly Minilibix(3))

ubuntu 22.04

./configure
configure [error] : Can't find a suitable X11 include directory.
make: *** [Makefile:17: do_configure] Error 1

cd

mkdir tmp
cd tmp
rm -rf ../tmp
pwd

cd ..

leak

Last version of libmlx.a causes "warning: size of symbol `mlx_int_param_event' changed" issue with program made with the previous version.

Running a MiniRT project with the newest version of minilibx-linux, I encountered the following problem when compiling:

/usr/bin/ld: warning: size of symbol `mlx_int_param_event' changed from 296 in objs/main/init_rt.o to 288 in /usr/local/lib/libmlx.a(mlx_int_param_event.o

After that, any function using the mlx int parameters stops working i.e. can't close windows by clicking the "x" buttons, the program simply ignores any function that calls these parameters. This behavior happens even on the mlx tester program.

The problem was solved by using a libmlx.a file compiled from the august release instead of the late november one.

Transparent pixels overwrite existing pixels on mlx_put_image_to_window

When trying to use an .xpm image with transparency that transparency will replace pixels despite being completely transparent. Using the mac mlx transparency works fine:
bug difference
Mac left, Linux right, using the same test code where first blue.xpm is put to the window and then red.xpm is put to the window. (both 8x8 pixels, hence the weirdly thin top bars of the windows)

having an issue to mlx_init, it returns 0

Hi, not sure where went wrong, I can't get display!!, please help, man thanks.

echo $DISPLAY
8:8:8:8:0.0

C:\WINDOWS\system32>wsl --status
Default Distribution: Ubuntu
Default Version: 2

The following code having mlx_init() returns 0, which means can't get display
#include <mlx.h>
#include <stdio.h>
typedef struct s_data {
void *img;
char *addr;
int bits_per_pixel;
int line_length;
int endian;
} t_data;

void my_mlx_pixel_put(t_data *data, int x, int y, int color)
{
char *dst;

    dst = data->addr + (y * data->line_length + x * (data->bits_per_pixel / 8));
    *(unsigned int*)dst = color;

}

int main(void)
{
void *mlx;
// void *mlx_win;
t_data img;
printf("cp1");
fflush(stdout);
mlx = mlx_init();

Installing on mac Sonoma 14.1.1 M2

Is minilibX supported on M2 chips with macOS Sonoma 14.1.1 M2 ?
I've run ./configure (got a lot of warnings, don't know if that's normal ?) and then when i run the ./run_tests.sh, the program goes through the 25 countdown and then stops with this message :

run_tests [info] : Ready to "just play" using xdotool
./run_tests.sh: line 35:  5610 Terminated: 15          ./mlx-test
run_tests [error] : Pid [5610] died with status 1 

(the pid number changes every time)
Should i just instal a virtual machine with linux/ubuntu on my computer ?

Fix leak on mlx_init fail

Hey,

I just found a leak when trying to run mlx_init with empty environment, I tested it with :
env -i ./program
I dived into the code and found the problem, so I've written a patch.

Best regards, Tony.

mlx_destroy_display()

Hello ! I get some issues with mlx_destroy_display()
I am using it in a quit function, no problem via ESC key event for close the program but I get this error message via red cross windows close program :

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  4 (X_DestroyWindow)
  Resource id in failed request:  0x6e00001
  Serial number of failed request:  658
  Current serial number in output stream:  661

I have noticed If i don't use it with mlx_destroy_windows() this way, I don't have this issue. Maybe I don't have understand the way to use it ?
Here is my implementation :

void	ft_init_mrt(t_minirt *mrt)
{
	mrt->mlx = mlx_init();
	mrt->win = mlx_new_window(mrt->mlx, 1024, 768, "miniRT");
}

int		ft_exit_mrt(t_minirt *mrt)
{
	mlx_destroy_window(mrt->mlx, mrt->win);
	mlx_destroy_display(mrt->mlx);
	ft_putstr_fd("bye bye !", 1);
	exit(0);
	return (0);
}

int	key_win3(int key, t_minirt *mrt)
{
	printf("Key in Win3 : %d\n",key);
	if (key==0xFF1B)
		ft_exit_mrt(mrt);
	return (0);
}

int		main()
{
	t_minirt	mrt;
	ft_init_mrt(&mrt);
	mlx_key_hook(mrt.win, key_win3, &mrt);
	mlx_hook(mrt.win, 17, 1L<<17, ft_exit_mrt, &mrt);
	mlx_loop(mrt.mlx);
	return (0);
}

mlx_mouse_move doesn't move cursor

Does the function mlx_mouse_move work as intended? It seems like it changes the mouse position in the background (I can see that using mlx_mouse_get_pos), however the cursor (visually) doesn't move. When I move the mouse afterwards and use mlx_mouse_get_pos again, I get a position close to the original one (so it seems that the point of reference is the visual cursor, not the values I get with mlx_mouse_get_pos). Hiding and showing the cursor doesn't change that.

Segfault in mlx_loop

If i use mlx_loop_end i get segfault.
Reason is:
In mlx_loop funcs not check is xvars->loop is not null:
XSync(xvar->display, False);
xvar->loop_hook(xvar->loop_param);
possible correct version:
XSync(xvar->display, False);
if (xvar->loop_hook)
xvar->loop_hook(xvar->loop_param);

Les callbacks dans les hooks n'ont pas des signatures de fonctions correcte.

Bonjour,
je suis entrain de faire des bindings pour rust, et arrivant sur les hooks, une question me chiffonne particulierement.
Les mlx_*hook prennent int (*func_ptr)() chacun, bien que ceux ci prennent differents arguments. Serait-il possible de signer les fonctions selon leurs parametres respectifs ?

Can't compile

I'm trying to compile MiniLIBX on my personal computer but i'm met with a bunch of errors, i've already installed all the necessary packages but still get the same errors over and over.

I'm running on Ubuntu 22.04, with clang 11.4.0 and running version 4.3 of GNU Make

mlx_init.c:(.text+0x30): undefined reference to XShmQueryVersion' /usr/bin/ld: mlx_init.c:(.text+0xe4): undefined reference to XShmPixmapFormat'
/usr/bin/ld: mlx/libmlx_Linux.a(mlx_init.o): in function mlx_init': mlx_init.c:(.text+0x204): undefined reference to XOpenDisplay'
/usr/bin/ld: mlx_init.c:(.text+0x298): undefined reference to XInternAtom' /usr/bin/ld: mlx_init.c:(.text+0x2af): undefined reference to XInternAtom'
/usr/bin/ld: mlx_init.c:(.text+0x301): undefined reference to XCreateColormap' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_new_window.o): in function mlx_new_window':
mlx_new_window.c:(.text+0x92): undefined reference to XCreateWindow' /usr/bin/ld: mlx_new_window.c:(.text+0xbd): undefined reference to XStoreName'
/usr/bin/ld: mlx_new_window.c:(.text+0xd3): undefined reference to XSetWMProtocols' /usr/bin/ld: mlx_new_window.c:(.text+0xfb): undefined reference to XCreateGC'
/usr/bin/ld: mlx_new_window.c:(.text+0x12d): undefined reference to XMapRaised' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_loop.o): in function mlx_loop':
mlx_loop.c:(.text+0x8b): undefined reference to XPending' /usr/bin/ld: mlx_loop.c:(.text+0x9f): undefined reference to XNextEvent'
/usr/bin/ld: mlx_loop.c:(.text+0xe4): undefined reference to XSync' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_int_anti_resize_win.o): in function mlx_int_anti_resize_win':
mlx_int_anti_resize_win.c:(.text+0x57): undefined reference to XGetWMNormalHints' /usr/bin/ld: mlx_int_anti_resize_win.c:(.text+0x84): undefined reference to XSetWMNormalHints'
/usr/bin/ld: mlx/libmlx_Linux.a(mlx_int_wait_first_expose.o): in function mlx_int_wait_first_expose': mlx_int_wait_first_expose.c:(.text+0x32): undefined reference to XWindowEvent'
/usr/bin/ld: mlx_int_wait_first_expose.c:(.text+0x3d): undefined reference to XPutBackEvent' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_int_get_visual.o): in function mlx_int_get_visual':
mlx_int_get_visual.c:(.text+0x67): undefined reference to XGetVisualInfo' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_destroy_window.o): in function mlx_destroy_window':
mlx_destroy_window.c:(.text+0x72): undefined reference to XDestroyWindow' /usr/bin/ld: mlx_destroy_window.c:(.text+0x7e): undefined reference to XFreeGC'
/usr/bin/ld: mlx_destroy_window.c:(.text+0xd0): undefined reference to XFlush' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_int_param_event.o): in function mlx_int_param_KeyPress':
mlx_int_param_event.c:(.text+0xe4): undefined reference to XkbKeycodeToKeysym' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_int_param_event.o): in function mlx_int_param_KeyRelease':
mlx_int_param_event.c:(.text+0x124): undefined reference to XkbKeycodeToKeysym' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_int_set_win_event_mask.o): in function mlx_int_set_win_event_mask':
mlx_int_set_win_event_mask.c:(.text+0x64): undefined reference to XChangeWindowAttributes' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_hook.o): in function mlx_do_key_autorepeatoff':
mlx_hook.c:(.text+0x28): undefined reference to XAutoRepeatOff' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_hook.o): in function mlx_do_key_autorepeaton':
mlx_hook.c:(.text+0x38): undefined reference to XAutoRepeatOn' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_hook.o): in function mlx_do_sync':
mlx_hook.c:(.text+0x4a): undefined reference to XSync' /usr/bin/ld: mlx/libmlx_Linux.a(mlx_destroy_display.o): in function mlx_destroy_display':
mlx_destroy_display.c:(.text+0x8): undefined reference to `XCloseDisplay'

Invalid read on DestroyNotify

Calling mlx_destroy_window through DestroyNotify hook causes invalid read. This is happening in this snippet:

if (win && ev.type == ClientMessage && ev.xclient.message_type == xvar->wm_protocols && ev.xclient.data.l[0] == xvar->wm_delete_window && win->hooks[DestroyNotify].hook)
win->hooks[DestroyNotify].hook(win->hooks[DestroyNotify].param);
if (win && ev.type < MLX_MAX_EVENT && win->hooks[ev.type].hook)
mlx_int_param_event[ev.type](xvar, &ev, win);

I think this is caused by the check of win->hooks[ev.type].hook at line 55 after win is freed in the previous line.

implicit declaration of function

$ ./configure

X11 include dir : /usr/include
lib_Linux generation
Now make it.
gcc -O3 -I/usr/include -c -o mlx_init.o mlx_init.c
gcc -O3 -I/usr/include -c -o mlx_new_window.o mlx_new_window.c
gcc -O3 -I/usr/include -c -o mlx_pixel_put.o mlx_pixel_put.c
gcc -O3 -I/usr/include -c -o mlx_loop.o mlx_loop.c
gcc -O3 -I/usr/include -c -o mlx_mouse_hook.o mlx_mouse_hook.c
gcc -O3 -I/usr/include -c -o mlx_key_hook.o mlx_key_hook.c
gcc -O3 -I/usr/include -c -o mlx_expose_hook.o mlx_expose_hook.c
gcc -O3 -I/usr/include -c -o mlx_loop_hook.o mlx_loop_hook.c
gcc -O3 -I/usr/include -c -o mlx_int_anti_resize_win.o mlx_int_anti_resize_win.c
gcc -O3 -I/usr/include -c -o mlx_int_do_nothing.o mlx_int_do_nothing.c
gcc -O3 -I/usr/include -c -o mlx_int_wait_first_expose.o mlx_int_wait_first_expose.c
gcc -O3 -I/usr/include -c -o mlx_int_get_visual.o mlx_int_get_visual.c
gcc -O3 -I/usr/include -c -o mlx_flush_event.o mlx_flush_event.c
gcc -O3 -I/usr/include -c -o mlx_string_put.o mlx_string_put.c
gcc -O3 -I/usr/include -c -o mlx_new_image.o mlx_new_image.c
gcc -O3 -I/usr/include -c -o mlx_get_data_addr.o mlx_get_data_addr.c
gcc -O3 -I/usr/include -c -o mlx_put_image_to_window.o mlx_put_image_to_window.c
gcc -O3 -I/usr/include -c -o mlx_get_color_value.o mlx_get_color_value.c
gcc -O3 -I/usr/include -c -o mlx_clear_window.o mlx_clear_window.c
gcc -O3 -I/usr/include -c -o mlx_xpm.o mlx_xpm.c
mlx_xpm.c: In function ‘mlx_int_parse_xpm’:
mlx_xpm.c:210:20: warning: implicit declaration of function ‘mlx_get_color_value’; did you mean ‘mlx_int_get_col_name’? [-Wimplicit-function-declaration]
rgb_col>=0?mlx_get_color_value(xvar, rgb_col):rgb_col;
^~~~~~~~~~~~~~~~~~~
mlx_int_get_col_name

gcc -O3 -I/usr/include -c -o mlx_int_str_to_wordtab.o mlx_int_str_to_wordtab.c
gcc -O3 -I/usr/include -c -o mlx_destroy_window.o mlx_destroy_window.c
gcc -O3 -I/usr/include -c -o mlx_int_param_event.o mlx_int_param_event.c
mlx_int_param_event.c: In function ‘mlx_int_param_KeyPress’:
mlx_int_param_event.c:19:29: warning: implicit declaration of function ‘XkbKeycodeToKeysym’; did you mean ‘XKeycodeToKeysym’? [-Wimplicit-function-declaration]
win->hooks[KeyPress].hook(XkbKeycodeToKeysym(xvar->display,
^~~~~~~~~~~~~~~~~~
XKeycodeToKeysym

gcc -O3 -I/usr/include -c -o mlx_int_set_win_event_mask.o mlx_int_set_win_event_mask.c
gcc -O3 -I/usr/include -c -o mlx_hook.o mlx_hook.c
gcc -O3 -I/usr/include -c -o mlx_rgb.o mlx_rgb.c
gcc -O3 -I/usr/include -c -o mlx_destroy_image.o mlx_destroy_image.c
gcc -O3 -I/usr/include -c -o mlx_mouse.o mlx_mouse.c
gcc -O3 -I/usr/include -c -o mlx_screen_size.o mlx_screen_size.c
ar -r libmlx.a mlx_init.o mlx_new_window.o mlx_pixel_put.o mlx_loop.o mlx_mouse_hook.o mlx_key_hook.o mlx_expose_hook.o mlx_loop_hook.o mlx_int_anti_resize_win.o mlx_int_do_nothing.o mlx_int_wait_first_expose.o mlx_int_get_visual.o mlx_flush_event.o mlx_string_put.o mlx_new_image.o mlx_get_data_addr.o mlx_put_image_to_window.o mlx_get_color_value.o mlx_clear_window.o mlx_xpm.o mlx_int_str_to_wordtab.o mlx_destroy_window.o mlx_int_param_event.o mlx_int_set_win_event_mask.o mlx_hook.o mlx_rgb.o mlx_destroy_image.o mlx_mouse.o mlx_screen_size.o
ar: creating libmlx.a
ranlib libmlx.a
cp libmlx.a libmlx_Linux.a
gcc -I/usr/include -O3 -I.. -c -o main.o main.c
main.c: In function ‘main’:
main.c:118:3: warning: implicit declaration of function ‘color_map_1’ [-Wimplicit-function-declaration]
color_map_1(win1,WIN1_SX,WIN1_SY);
^~~~~~~~~~~
main.c:138:3: warning: implicit declaration of function ‘color_map_2’ [-Wimplicit-function-declaration]
color_map_2(data1,bpp1,sl1,IM1_SX,IM1_SY,endian1, 1);
^~~~~~~~~~
~
gcc -o mlx-test main.o -L.. -lmlx -L/usr/include/../lib -lXext -lX11 -lm -lbsd

Too many implicit declaration

./configure
X11 include dir : /usr/include
lib_Linux generation
Now make it.
make[1]: Entering directory '/home/st4ck/projects/42-fdf/libmlx'
gcc -O3 -I/usr/include   -c -o mlx_init.o mlx_init.c
mlx_init.c: In function ‘mlx_init’:
mlx_init.c:26:6: warning: implicit declaration of function ‘mlx_int_get_visual’; did you mean ‘mlx_int_deal_shm’? [-Wimplicit-function-declaration]
  if (mlx_int_get_visual(xvar)==-1)
      ^~~~~~~~~~~~~~~~~~
      mlx_int_deal_shm
gcc -O3 -I/usr/include   -c -o mlx_new_window.o mlx_new_window.c
gcc -O3 -I/usr/include   -c -o mlx_pixel_put.o mlx_pixel_put.c
gcc -O3 -I/usr/include   -c -o mlx_loop.o mlx_loop.c
mlx_loop.c: In function ‘mlx_loop’:
mlx_loop.c:22:2: warning: implicit declaration of function ‘mlx_int_set_win_event_mask’; did you mean ‘mlx_int_str_to_wordtab’? [-Wimplicit-function-declaration]
  mlx_int_set_win_event_mask(xvar);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
  mlx_int_str_to_wordtab
gcc -O3 -I/usr/include   -c -o mlx_mouse_hook.o mlx_mouse_hook.c
gcc -O3 -I/usr/include   -c -o mlx_key_hook.o mlx_key_hook.c
gcc -O3 -I/usr/include   -c -o mlx_expose_hook.o mlx_expose_hook.c
gcc -O3 -I/usr/include   -c -o mlx_loop_hook.o mlx_loop_hook.c
gcc -O3 -I/usr/include   -c -o mlx_int_anti_resize_win.o mlx_int_anti_resize_win.c
gcc -O3 -I/usr/include   -c -o mlx_int_do_nothing.o mlx_int_do_nothing.c
gcc -O3 -I/usr/include   -c -o mlx_int_wait_first_expose.o mlx_int_wait_first_expose.c
gcc -O3 -I/usr/include   -c -o mlx_int_get_visual.o mlx_int_get_visual.c
gcc -O3 -I/usr/include   -c -o mlx_flush_event.o mlx_flush_event.c
gcc -O3 -I/usr/include   -c -o mlx_string_put.o mlx_string_put.c
gcc -O3 -I/usr/include   -c -o mlx_new_image.o mlx_new_image.c
mlx_new_image.c: In function ‘shm_att_pb’:
mlx_new_image.c:27:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(2,WARN_SHM_ATTACH,strlen(WARN_SHM_ATTACH));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -I/usr/include   -c -o mlx_get_data_addr.o mlx_get_data_addr.c
gcc -O3 -I/usr/include   -c -o mlx_put_image_to_window.o mlx_put_image_to_window.c
gcc -O3 -I/usr/include   -c -o mlx_get_color_value.o mlx_get_color_value.c
gcc -O3 -I/usr/include   -c -o mlx_clear_window.o mlx_clear_window.c
gcc -O3 -I/usr/include   -c -o mlx_xpm.o mlx_xpm.c
mlx_xpm.c: In function ‘mlx_int_get_line’:
mlx_xpm.c:32:15: warning: implicit declaration of function ‘mlx_int_str_str’; did you mean ‘mlx_int_deal_shm’? [-Wimplicit-function-declaration]
   if ((pos2 = mlx_int_str_str(ptr+*pos,"\"",size-*pos))==-1)
               ^~~~~~~~~~~~~~~
               mlx_int_deal_shm
mlx_xpm.c: In function ‘mlx_int_static_line’:
mlx_xpm.c:62:3: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
   strlcpy(copy, str, len2+1);
   ^~~~~~~
   strncpy
mlx_xpm.c: In function ‘mlx_int_parse_xpm’:
mlx_xpm.c:192:15: warning: implicit declaration of function ‘mlx_get_color_value’; did you mean ‘mlx_int_get_col_name’? [-Wimplicit-function-declaration]
    rgb_col>=0?mlx_get_color_value(xvar, rgb_col):rgb_col;
               ^~~~~~~~~~~~~~~~~~~
               mlx_int_get_col_name
mlx_xpm.c: In function ‘mlx_int_file_get_rid_comment’:
mlx_xpm.c:267:23: warning: implicit declaration of function ‘mlx_int_str_str_cote’; did you mean ‘mlx_int_str_to_wordtab’? [-Wimplicit-function-declaration]
   while ((com_begin = mlx_int_str_str_cote(ptr,"/*",size))!=-1)
                       ^~~~~~~~~~~~~~~~~~~~
                       mlx_int_str_to_wordtab
gcc -O3 -I/usr/include   -c -o mlx_int_str_to_wordtab.o mlx_int_str_to_wordtab.c
gcc -O3 -I/usr/include   -c -o mlx_destroy_window.o mlx_destroy_window.c
gcc -O3 -I/usr/include   -c -o mlx_int_param_event.o mlx_int_param_event.c
mlx_int_param_event.c: In function ‘mlx_int_param_KeyPress’:
mlx_int_param_event.c:19:29: warning: implicit declaration of function ‘XkbKeycodeToKeysym’; did you mean ‘XKeycodeToKeysym’? [-Wimplicit-function-declaration]
   win->hooks[KeyPress].hook(XkbKeycodeToKeysym(xvar->display,
                             ^~~~~~~~~~~~~~~~~~
                             XKeycodeToKeysym
gcc -O3 -I/usr/include   -c -o mlx_int_set_win_event_mask.o mlx_int_set_win_event_mask.c
gcc -O3 -I/usr/include   -c -o mlx_hook.o mlx_hook.c
gcc -O3 -I/usr/include   -c -o mlx_rgb.o mlx_rgb.c
gcc -O3 -I/usr/include   -c -o mlx_destroy_image.o mlx_destroy_image.c
gcc -O3 -I/usr/include   -c -o mlx_screen_size.o mlx_screen_size.c
ar -r libmlx.a mlx_init.o mlx_new_window.o mlx_pixel_put.o mlx_loop.o mlx_mouse_hook.o mlx_key_hook.o mlx_expose_hook.o mlx_loop_hook.o mlx_int_anti_resize_win.o mlx_int_do_nothing.o mlx_int_wait_first_expose.o mlx_int_get_visual.o mlx_flush_event.o mlx_string_put.o mlx_new_image.o mlx_get_data_addr.o mlx_put_image_to_window.o mlx_get_color_value.o mlx_clear_window.o mlx_xpm.o mlx_int_str_to_wordtab.o mlx_destroy_window.o mlx_int_param_event.o mlx_int_set_win_event_mask.o mlx_hook.o mlx_rgb.o mlx_destroy_image.o mlx_screen_size.o
ar: creating libmlx.a
ranlib libmlx.a
cp libmlx.a libmlx_Linux.a
make[1]: Leaving directory '/home/st4ck/projects/42-fdf/libmlx'
make[1]: Entering directory '/home/st4ck/projects/42-fdf/libmlx/test'
gcc -I/usr/include -O3 -I..   -c -o main.o main.c
main.c: In function ‘main’:
main.c:118:3: warning: implicit declaration of function ‘color_map_1’ [-Wimplicit-function-declaration]
   color_map_1(win1,WIN1_SX,WIN1_SY);
   ^~~~~~~~~~~
main.c:138:3: warning: implicit declaration of function ‘color_map_2’ [-Wimplicit-function-declaration]
   color_map_2(data1,bpp1,sl1,IM1_SX,IM1_SY,endian1, 1);
   ^~~~~~~~~~~

Possible de rajouter proprement les include ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.