开发者

cannot compile app with libyahoo2

开发者 https://www.devze.com 2023-03-11 20:05 出处:网络
folks, i got an issue which really pain for me i got few line and while compile these code it shows some error

folks, i got an issue which really pain for me

i got few line and while compile these code it shows some error

while it compiling

$ gcc `pkg-config --cflags glib-2.0` main.c -lssl

output

/tmp/ccQ7vAnA.o: In function `yahoo_ping_timeout_callback':
main.c:(.text+0x4ca): undefined reference to `yahoo_keepalive'
/tmp/ccQ7vAnA.o: In function `yahoo_webcam_timeout_callback':
main.c:(.text+0x6bd): undefined reference to `yahoo_webcam_send_image'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_got_conf_invite':
main.c:(.text+0x86f): undefined reference to `y_list_append'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_conf_userdecline':
main.c:(.text+0x96d): undefined reference to `y_list_remove_link'
main.c:(.text+0x97e): undefined reference to `y_list_free_1'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_conf_userjoin':
main.c:(.text+0xa54): undefined reference to `y_list_append'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_conf_开发者_高级运维userleave':
main.c:(.text+0xb17): undefined reference to `y_list_remove_link'
main.c:(.text+0xb28): undefined reference to `y_list_free_1'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_conf_message':
main.c:(.text+0xb85): undefined reference to `y_utf8_to_str'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_chat_room_received':
main.c:(.text+0x135d): undefined reference to `yahoo_get_chat_room_list'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_chat_message':
main.c:(.text+0x15c7): undefined reference to `y_utf8_to_str'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_got_buddies':
main.c:(.text+0x1acc): undefined reference to `y_list_append'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_got_im':
main.c:(.text+0x1caa): undefined reference to `y_utf8_to_str'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_webcam_viewer':
main.c:(.text+0x22cc): undefined reference to `yahoo_webcam_accept_viewer'
/tmp/ccQ7vAnA.o: In function `yahoo_logout':
main.c:(.text+0x2528): undefined reference to `yahoo_conference_logoff'
main.c:(.text+0x265e): undefined reference to `yahoo_logoff'
main.c:(.text+0x2671): undefined reference to `yahoo_close'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_login':
main.c:(.text+0x273c): undefined reference to `yahoo_init_with_attributes'
main.c:(.text+0x276a): undefined reference to `yahoo_login'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_login_response':
main.c:(.text+0x27ba): undefined reference to `yahoo_current_status'
/tmp/ccQ7vAnA.o: In function `yahoo_set_current_state':
main.c:(.text+0x2b5a): undefined reference to `yahoo_set_away'
main.c:(.text+0x2b86): undefined reference to `yahoo_set_away'
main.c:(.text+0x2bb2): undefined reference to `yahoo_set_away'
/tmp/ccQ7vAnA.o: In function `ext_yahoo_add_handler':
main.c:(.text+0x2ccb): undefined reference to `y_list_prepend'
/tmp/ccQ7vAnA.o: In function `yahoo_callback':
main.c:(.text+0x3082): undefined reference to `yahoo_read_ready'
main.c:(.text+0x30c5): undefined reference to `yahoo_write_ready'
/tmp/ccQ7vAnA.o: In function `process_commands':
main.c:(.text+0x37b1): undefined reference to `yahoo_send_im'
main.c:(.text+0x37c1): undefined reference to `y_str_to_utf8'
main.c:(.text+0x37fd): undefined reference to `yahoo_send_im'
main.c:(.text+0x390d): undefined reference to `yahoo_conference_message'
main.c:(.text+0x3ad4): undefined reference to `y_list_append'
main.c:(.text+0x3b1e): undefined reference to `y_list_append'
main.c:(.text+0x3b87): undefined reference to `y_list_append'
main.c:(.text+0x3bc3): undefined reference to `yahoo_conference_invite'
main.c:(.text+0x3be4): undefined reference to `y_list_append'
main.c:(.text+0x3c42): undefined reference to `y_list_append'
main.c:(.text+0x3cb7): undefined reference to `y_list_free'
main.c:(.text+0x3d08): undefined reference to `yahoo_conference_addinvite'
main.c:(.text+0x3d27): undefined reference to `y_list_append'
main.c:(.text+0x3d46): undefined reference to `y_list_free'
main.c:(.text+0x3e2c): undefined reference to `y_list_append'
main.c:(.text+0x3e5e): undefined reference to `yahoo_conference_logon'
main.c:(.text+0x3f02): undefined reference to `yahoo_conference_logoff'
main.c:(.text+0x3f16): undefined reference to `y_list_remove'
main.c:(.text+0x40d6): undefined reference to `yahoo_conference_decline'
main.c:(.text+0x40ea): undefined reference to `y_list_remove'
main.c:(.text+0x420b): undefined reference to `yahoo_get_chatrooms'
main.c:(.text+0x4265): undefined reference to `yahoo_get_chat_room_list'
main.c:(.text+0x4383): undefined reference to `yahoo_chat_logon'
main.c:(.text+0x4441): undefined reference to `yahoo_chat_message'
main.c:(.text+0x449b): undefined reference to `yahoo_chat_ignore'
main.c:(.text+0x44f5): undefined reference to `yahoo_chat_ignore'
main.c:(.text+0x4534): undefined reference to `yahoo_chat_logoff'
main.c:(.text+0x4600): undefined reference to `yahoo_set_away'
main.c:(.text+0x4671): undefined reference to `yahoo_get_identities'
main.c:(.text+0x470b): undefined reference to `yahoo_set_identity_status'
main.c:(.text+0x4751): undefined reference to `yahoo_set_identity_status'
main.c:(.text+0x4973): undefined reference to `yahoo_set_yab'
main.c:(.text+0x49fa): undefined reference to `yahoo_webcam_get_feed'
main.c:(.text+0x4a30): undefined reference to `yahoo_webcam_get_feed'
main.c:(.text+0x4a7f): undefined reference to `yahoo_webcam_invite'
/tmp/ccQ7vAnA.o: In function `main':
main.c:(.text+0x4dc0): undefined reference to `yahoo_set_log_level'
main.c:(.text+0x4f44): undefined reference to `y_list_remove_link'
main.c:(.text+0x4f58): undefined reference to `y_list_free_1'
main.c:(.text+0x534e): undefined reference to `y_list_remove_link'
main.c:(.text+0x5362): undefined reference to `y_list_free_1'
/tmp/ccQ7vAnA.o: In function `register_callbacks':
main.c:(.text+0x589a): undefined reference to `yahoo_register_callbacks'
collect2: ld returned 1 exit status

anyway i included header of library from folder not from library shared,

#include "yao/yahoo2.h"
#include "yao/yahoo2_callbacks.h"
#include "yao/yahoo_util.h"

and i believe, the way I compile the code is extremely wrong, and i have no idea about it. well, anyone mind to put me out of these misery ?

really thank in advance

source

http://pastebin.com/TBetQxpF

regarding to limit of posting char on stackoverflow, i've pasted it on pastebin i hope these could make you getting easier to understand what im talkin about..


Try adding -lyahoo2 in your gcc line.

Edit: It seems that you should implement ext_* functions by yourself.

From libyahoo2 - README:

"yahoo2_callbacks.h contains prototypes for functions that you must implement. All these functions must be implemented by your code."

Edit2: Try to add a call to your register_callbacks() function in the very beginning of your main() function.

0

精彩评论

暂无评论...
验证码 换一张
取 消