0
votes

i am following a book (Foundation of Gtk+) and when i compile these files :

http://pastebin.com/LagSdYwF

http://pastebin.com/0wNV6Feb

http://pastebin.com/iK0cfMY6

the terminal output this (gcc ipaddresstest.c $(pkg-config --cflags --libs gtk+-2.0)) :

ipaddresstest.c :(. text + 0xC9): undefined reference to "my_ip_address_new"

ipaddresstest.c :(. text + 0xD2): undefined reference to "my_ip_address_get_type"

ipaddresstest.c :(. text + 0xF6): undefined reference to "my_ip_address_set_address"

/tmp/cclTaXSL.o: in "ip_address_changed" function:

ipaddresstest.c :(. text + 0x183): undefined reference to "my_ip_address_get_address"

collect2: error: ld returned 1 exit status

i didn't find nothing about this. Where is the mistake?

PS: can you tell me about guide of this argument for gtk3?

1

1 Answers

0
votes

You're referencing symbols which cannot be resolved. Could it be because you have no mention of myipaddress.c, which has the function definitions, when you are invoking gcc?