<div>===================<br></div><div>$ gcc dial_test.o gtkdial.o -o dial_test `pkg-config --libs gtk+-2.0 `<br></div><div><br></div><div>/usr/bin/ld: gtkdial.o: undefined reference to symbol 'cos@@GLIBC_2.2.5'<br></div><div>/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line<br></div><div>collect2: error: ld returned 1 exit status<br></div><div><br></div><div><br></div><div>Solution:<br></div><div>$ gcc dial_test.o gtkdial.o -o dial_test `pkg-config --libs gtk+-2.0 ` -lm<br></div><div><br></div><div><br></div><div><a href="https://stackoverflow.com/questions/16006145/ld-undefined-reference-to-symbol-log2glibc-2-2-5">https://stackoverflow.com/questions/16006145/ld-undefined-reference-to-symbol-log2glibc-2-2-5</a><br></div><div>==================================<br></div><div><br></div><div>$ make<br></div><div>gcc list.c -o list  `pkg-config gtk+-2.0 --cflags --libs`<br></div><div>list.c:2:10: fatal error: config.h: Nie ma takiego pliku ani katalogu<br></div><div>    2 | #include "config.h"<br></div><div>      |          ^~~~~~~~~~<br></div><div>compilation terminated.<br></div><div>make: *** [Makefile:13: list] Błąd 1<br></div><div><br></div><div><br></div><div>Solution:<br></div><div>Remove from file<br></div><div>#include "config.h"<br></div><div><br></div><div>==================================<br></div><div><br></div><div>$ make<br></div><div>gcc rulers.c -o rulers -Wall -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED `pkg-config gtk+-2.0 --cflags --libs`<br></div><div>rulers.c: In function ‘main’:<br></div><div>rulers.c:45:13: warning: implicit declaration of function ‘gtk_hruler_new’; did you mean ‘gtk_table_new’? [-Wimplicit-function-declaration]<br></div><div>   45 |     hrule = gtk_hruler_new ();<br></div><div>      |             ^~~~~~~~~~~~~~<br></div><div>      |             gtk_table_new<br></div><div>rulers.c:45:11: warning: assignment to ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]<br></div><div>   45 |     hrule = gtk_hruler_new ();<br></div><div>      |           ^<br></div><div>rulers.c:46:5: warning: implicit declaration of function ‘gtk_ruler_set_metric’; did you mean ‘gtk_hsv_set_metrics’? [-Wimplicit-function-declaration]<br></div><div>   46 |     gtk_ruler_set_metric (GTK_RULER (hrule), GTK_PIXELS);<br></div><div>      |     ^~~~~~~~~~~~~~~~~~~~<br></div><div>      |     gtk_hsv_set_metrics<br></div><div>rulers.c:46:27: warning: implicit declaration of function ‘GTK_RULER’; did you mean ‘GTK_BUILDER’? [-Wimplicit-function-declaration]<br></div><div>   46 |     gtk_ruler_set_metric (GTK_RULER (hrule), GTK_PIXELS);<br></div><div>      |                           ^~~~~~~~~<br></div><div>      |                           GTK_BUILDER<br></div><div>...<br></div><div><br></div><div><br></div><div>Solution:<br></div><div>Compile by hand:<br></div><div>gcc rulers.c -o rulers `pkg-config --libs gtk+-2.0 --cflags --libs`<br></div><div><br></div><div>==================================<br></div><div><br></div><div>scribble-xinput.c:162:58: error: invalid type argument of ‘->’ (have ‘int’)<br></div><div>  162 |       g_signal_connect_swapped (GTK_INPUT_DIALOG (inputd)->close_button,<br></div><div>      |                                                          ^~<br></div><div>/usr/include/glib-2.0/gobject/gsignal.h:544:29: note: in definition of macro ‘g_signal_connect_swapped’<br></div><div>  544 |     g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED)<br></div><div>      |                             ^~~~~~~~<br></div><div>scribble-xinput.c:166:49: error: invalid type argument of ‘->’ (have ‘int’)<br></div><div>  166 |       gtk_widget_hide (GTK_INPUT_DIALOG (inputd)->save_button);<br></div><div>      |                                                 ^~<br></div><div>make: *** [Makefile:11: scribble-xinput] Błąd 1<br></div><div><br></div><div><br></div><div>Solution:<br></div><div>Compile by hand:<br></div><div>cc scribble-xinput.c -o scribble-xinput $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`<br></div><div>==================================<br></div><div><br></div><div><br></div><div>$ ./wheelbarrow<br></div><div>Memory protection violation (memory dump)<br></div><div><br></div><div>$ ./pixmap<br></div><div>Memory protection violation (memory dump)<br></div><div>===================================<br></div>