From: Philip T. <phi...@gm...> - 2013-07-03 18:34:02
|
On 2 July 2013 20:58, dark coder <dar...@gm...> wrote: > Hi. when i compile this code the out put is Segmentation fault > > > #include <libyahoo2/yahoo2.h> > #include <libyahoo2/yahoo2_callbacks.h> > #include <yahoo2.h> > #include <stdlib.h> > #include <string.h> > #include <stdio.h> > > int main() { > int id ; > char username[255] = "yahoooid2323"; > char password[255] = "1234335ss" ; > id = yahoo_init(username, password); > enum yahoo_status mYahoo ; > mYahoo = YAHOO_STATUS_AVAILABLE ; > yahoo_login(id , mYahoo ); > return 0; > } > > > would you mine plz help me ? > > >From the README file http://libyahoo2.sourceforge.net/README: yahoo2_callbacks.h contains prototypes for functions that you *must* implement. *All* these functions must be implemented by your code. You can choose at configure time whether these are implemented as callback functions or as a callback structure. In the code above it doesn't look like you've defined any of the callbacks, which is why you get a segmentation fault. |