Re: undefined reference to `UpnpInit'
<[email protected]> Thu, 18 Jan 2007 15:43:13 +0530
| Newsgroups | gmane.linux.upnp-sdk.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, U are not linking the library as I see the library name libupnp.a is not seen in ur command. "g++ -I/home/upnp/include/upnp -L/home/upnp/ test_init.c" Try "g++ -I/home/upnp/include/upnp -L/home/upnp/libupnp.a test_init.c" Also execute nm libupnp.a to make sure that the library has the function UpnpInit. By this, U would know if by chance upnpapi.c which has the function UpnpInit is excluded by any compile time option. Regds., Kitty. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Thang Sent: Thursday, January 18, 2007 2:06 PM To: [email protected] Subject: [UPnP-SDK-discuss] undefined reference to `UpnpInit' Hello, hope someone could help me:-( I tried to compile an example which is included in the tar-package version 1.3.1. You will find it in the dictionary /upnp/test/. If I compiled this example (test_init.c) using like this command: "g++ -I/home/upnp/include/upnp -L/home/upnp/ test_init.c" I got following message: "/tmp/ccxrFJde.o: In function `main': test_init.c:(.text+0xf1): undefined reference to `UpnpInit' ....... collect2: ld returned 1 exit status" The called function "UpnpInit" is declared in the header-file "upnp.h". I find it very strange and I don't have an idea why it does work. As you can see below I really bind the library:-( Hope you can help me. br, Thang ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE V _______________________________________________ UPnP-SDK-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/upnp-sdk-discuss ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV