Fedora Linux Support Community & Resources Center
  #1  
Old 7th July 2007, 02:44 AM
100%digital Offline
Registered User
 
Join Date: Mar 2007
Location: Arizona
Posts: 44
Linking references to functions

Hello All,

I'm trying to compile some software and it's failing with the folling error when i execute the "make" command;

[root@localhost rfakeap-0.2]# make
gcc -O -lrt -lpcap rfakeap.c -o rfakeap
/tmp/ccni2NDx.o: In function `main':
rfakeap.c.text+0x12b5): undefined reference to `pcap_open_live'
rfakeap.c.text+0x12fd): undefined reference to `pcap_setnonblock'
rfakeap.c.text+0x130a): undefined reference to `pcap_datalink'
rfakeap.c.text+0x13d7): undefined reference to `pcap_loop'

How do i link these references to my libpcap directory? Many thanks.
Reply With Quote
  #2  
Old 7th July 2007, 07:49 AM
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
Try
Code:
yum install libpcap-devel
Reply With Quote
  #3  
Old 7th July 2007, 07:36 PM
100%digital Offline
Registered User
 
Join Date: Mar 2007
Location: Arizona
Posts: 44
many thankx giulix i was able install fine after installing the libpcap develpoment package. so i didn't have the linked functioned because I didn't have the `pcap_open_live', `pcap_setnonblock', `pcap_datalink', `pcap_loop' functions without installing the libpcap-devel????

i'm more confused now then before, I was thinking the command would involve -ln???? can you please explain to me.

thanks again for your help.
Reply With Quote
  #4  
Old 7th July 2007, 10:58 PM
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
Yes, you were missing libpcap headers (/usr/include/pcap-bpf.h, /usr/include/pcap-namedb.h and /usr/include/pcap.h) which contain the functions signature
Reply With Quote
Reply

Tags
functions, linking, references

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache, MySQL, and BIND references techmatt Linux Chat 4 1st January 2007 09:35 PM
undefined references when linking c++ program sieg1974 Programming & Packaging 1 12th August 2006 09:55 AM
LaTeX references joa Using Fedora 0 30th September 2005 05:03 PM
MADWIFI and unresolved references rjmPowderhorn Servers & Networking 3 1st August 2004 05:11 PM


Current GMT-time: 12:01 (Friday, 24-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Nutley - Gargzdai - Jaynagar-Majilpur Photos