Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit declaration of function #11

Closed
michaelgiraldo opened this issue Aug 5, 2020 · 4 comments
Closed

implicit declaration of function #11

michaelgiraldo opened this issue Aug 5, 2020 · 4 comments

Comments

@michaelgiraldo
Copy link
Contributor

michaelgiraldo commented Aug 5, 2020

$ ./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

@Gtalavero
Copy link

Same for me in Ubuntu 18.04 with all the X11 packages installed.

Any solution? :(

@WildBoarGonnaGo
Copy link

Same problem

@Gtalavero
Copy link

Same problem
Do you fix it? If you do, can you tell how?

@amalliar
Copy link
Contributor

@Gtalavero I've added missing function declarations and headers here: #12
Note: if you want to be able to compile mlx-test, you need to temporarily comment out line 134 in mlx_int.h:
int (*(mlx_int_param_event[37]))();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants