Problems compiling the mybot example
Trevor Little
trevormg19 at gmail.com
Fri Apr 18 20:19:57 CEST 2008
Hi,
I am trying to use the silc-toolkit to write a bot for us to use
where I work. Here's a look at the system I'm using:
$ uname -a
Linux bruce 2.6.22-gentoo-r5 #4 Tue Feb 12 12:44:53 EST 2008 x86_64
Intel(R) Celeron(R) D CPU 3.20GHz GenuineIntel GNU/Linux
Anyway, I can't seem to figure out how to compile this mybot example.
I'm still learning my way around c so there may be something obvious
I'm ignoring here. Here's what I'm trying:
tlittle at bruce /usr/share/doc/silc-toolkit-1.1.7/tutorial $ ls -1
Makefile
Makefile.defines
Makefile.defines.in
Makefile.defines_int
Makefile.defines_int.in
Makefile.in
README
mybot
tlittle at bruce /usr/share/doc/silc-toolkit-1.1.7/tutorial $ cat README
This directory holds short tutorials and examples for the SILC Toolkit.
These tutorials are not compiled automatically when compiling the Toolkit.
To compile all tutorials give 'make' in this directory. You may also
compile only a specific tutorial in its subdirectory by giving 'make'
command.
tlittle at bruce /usr/share/doc/silc-toolkit-1.1.7/tutorial $ make
for i in mybot; do cd $i && make && cd ..; done;
make[1]: Entering directory `/usr/share/doc/silc-toolkit-1.1.7/tutorial/mybot'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory `/usr/share/doc/silc-toolkit-1.1.7/tutorial/mybot'
make: *** [make-all] Error 2
tlittle at bruce /usr/share/doc/silc-toolkit-1.1.7/tutorial $ cd mybot/
tlittle at bruce /usr/share/doc/silc-toolkit-1.1.7/tutorial/mybot $ make
make: *** No targets specified and no makefile found. Stop.
Trying to compile without the makefile gives me the following (I'm
really not sure if i'm including the right dirs or not).
tlittle at bruce /usr/share/doc/silc-toolkit-1.1.7/tutorial/mybot $ sudo
gcc -I/usr/include/silc-toolkit/ -I/usr/lib64/silc-toolkit mybot.c
/tmp/ccoAgsKd.o: In function `silc_connected':
mybot.c:(.text+0x3e): undefined reference to `silc_client_stop'
mybot.c:(.text+0x5e): undefined reference to `silc_client_stop'
mybot.c:(.text+0x92): undefined reference to `silc_client_command_call'
/tmp/ccoAgsKd.o: In function `silc_running':
mybot.c:(.text+0xf6): undefined reference to `silc_client_connect_to_server'
/tmp/ccoAgsKd.o: In function `mybot_start':
mybot.c:(.text+0x11e): undefined reference to `silc_calloc'
mybot.c:(.text+0x16e): undefined reference to `silc_client_alloc'
mybot.c:(.text+0x19f): undefined reference to `silc_net_localhost'
mybot.c:(.text+0x1ac): undefined reference to `silc_get_username'
mybot.c:(.text+0x1d0): undefined reference to `silc_client_init'
mybot.c:(.text+0x211): undefined reference to `silc_load_key_pair'
mybot.c:(.text+0x276): undefined reference to `silc_create_key_pair'
mybot.c:(.text+0x299): undefined reference to `silc_client_run'
mybot.c:(.text+0x2a5): undefined reference to `silc_client_free'
mybot.c:(.text+0x2ae): undefined reference to `silc_free'
/tmp/ccoAgsKd.o: In function `silc_command':
mybot.c:(.text+0x67f): undefined reference to `silc_get_status_message'
mybot.c:(.text+0x68b): undefined reference to `silc_get_command_name'
/tmp/ccoAgsKd.o: In function `silc_command_reply':
mybot.c:(.text+0x6de): undefined reference to `silc_get_status_message'
mybot.c:(.text+0x6ea): undefined reference to `silc_get_command_name'
mybot.c:(.text+0x7e6): undefined reference to `silc_client_send_channel_message'
mybot.c:(.text+0x80f): undefined reference to `silc_hash_alloc'
mybot.c:(.text+0x84c): undefined reference to `silc_client_send_channel_message'
mybot.c:(.text+0x855): undefined reference to `silc_hash_free'
/tmp/ccoAgsKd.o: In function `silc_verify_public_key':
mybot.c:(.text+0x8f8): undefined reference to `silc_show_public_key'
collect2: ld returned 1 exit status
Thanks in advance for any help you can give. Even a nudge in the right
direction would be appreciated.
-Trevor
More information about the silc-devel
mailing list