Re: undefined reference to `UpnpInit'
"Nektarios K. Papadopoulos" <[email protected]> Thu, 18 Jan 2007 19:05:56 +0200
| Newsgroups | gmane.linux.upnp-sdk.general |
|---|---|
| Message-ID | <[email protected]> |
this is what tells the linker to link the libupnp library -l is the option. upnp is the 'name' of the library. The 'lib' prefix and the .a (or .so) extensions are implied. -L is the search path for libraries -I is the search path for headers For details checkout 'man gcc' or 'man g++' cheers, nek Thang wrote: > Hi Nek, > > it works. Thx a lot. But is the meaning of "-lupnp"? > > br, > Thang > > > ext Nektarios K. Papadopoulos wrote: >> Hi Thang, >> >> can you try: >> g++ -I/home/upnp/include/upnp -L/home/upnp/ -lupnp test_init.c >> >> >> cheers, >> nek >> >> Thang wrote: >>> Hi Kitty, >>> >>> I already try your suggestion using command : >>> >>> "g++ -I/home/upnp/include/upnp -L/home/upnp/libupnp.a test_init.c" >>> The message after compiling is still the same: >>> >>> "/tmp/ccxrFJde.o: In function `main': >>> test_init.c:(.text+0xf1): undefined reference to `UpnpInit' >>> ....... >>> collect2: ld returned 1 exit status" :-( >>> >>> I also check the library libupnp.a if it contains the function UpnpInit. >>> >>> >>> You wrote: "By this, U would know if by chance upnpapi.c which has >>> the function >>> UpnpInit is excluded by any compile time option." >>> >>> Where can I find this c-file? In my opinion the UpnpInit is included. >>> I have check it in the package "libupnp-1.3.1" >>> >>> Do you another ideas???? >>> Maybe the installation wasn't successfully? >>> >>> 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=DEVDEV >>> >>> _______________________________________________ >>> UPnP-SDK-discuss mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/upnp-sdk-discuss >>> >> > > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ ------------------------------------------------------------------------- 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