Hi,<br>I got this compilation error while I try to write avahi client to publish service.<br>I was trying to write the program from the scratch. <br><br>Here is the program. <br><br>[code]<br><br>#include <stdio.h><br>
<br>#include <avahi-client/client.h><br>#include <avahi-client/lookup.h><br><br>#include <avahi-common/cdecl.h><br>#include <avahi-common/watch.h><br>#include <avahi-common/malloc.h><br>#include <avahi-common/error.h><br>
#include <avahi-common/simple-watch.h><br><br>static AvahiSimplePoll *simple_poll = NULL;<br><br>int main(int argc , char* argv)<br>{<br> AvahiClient *client = NULL;<br> AvahiServiceBrowser *sb = NULL;<br> int error;<br>
int ret = 1;<br> /*Allocate main loop object */<br><br> if (!(simple_poll = avahi_simple_poll_new()))<br> {<br> //TODO<br> }<br>//TODO<br>}<br><br>[/code]<br><br>And error is Here<br><br>lsf@lsf-laptop:~/mesh_project/dalesa/src/im$ gcc publish_service.c <br>
/tmp/ccavp1Yk.o: In function `main':<br>publish_service.c:(.text+0x27): undefined reference to `avahi_simple_poll_new'<br>collect2: ld returned 1 exit status<br><br>What is the wrong with this? <br><br>Thank you. <br>
<br>Nuwan Gunarathna<br>