LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-26-2006, 09:00 PM   #1
zhuqlfeixia
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Rep: Reputation: 0
Can't find "pcap_next_ex" after I setuped the libpcap


Hello everybody
I'm studying programing in Redhat9.0 now.
I want my program to capture the data in the newwork.
I first setup the libpcap,but when I compile my program,it said as follow:

[root@localhost code]# g++ CapturePtold.cpp -lpcap
/tmp/cc7SCTi9.o(.text+0x260): In function `main':
: undefined reference to `pcap_next_ex'
collect2: ld returned 1 exit status

Why?
I found there is a file "pcap.h" in the "/usr/local/include". So I think the pcap.c should in my computer. Why my compiler can't find the reference to "pcap_next_ex"?
Could somebody help me?
Thanks!
 
Old 02-26-2006, 09:32 PM   #2
zhuqlfeixia
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Oh,I have a complementarity that a mounth ago, I compile the program successly.
Than I installed the Redhat9 for a second time,and my give all the space of my hard dist to root"/",
I don't know if there is some bad effects to the g++ compiler or the setuping libpcap.

And I think I mabye did'n setup the libpcap successfully,how can I know it?
I use "which libpcap","which pcap",both can't find. Do I really setup the libpcap successfully?

Last edited by zhuqlfeixia; 02-26-2006 at 10:05 PM.
 
Old 02-26-2006, 10:06 PM   #3
zhuqlfeixia
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
And I think I mabye did'n setup the libpcap successfully,how can I know it?
I use "which libpcap","which pcap",both can't find. Do I really setup the libpcap successfully?
 
Old 02-27-2006, 10:30 PM   #4
zhuqlfeixia
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Oh, I use the command:rpm -q libpcap,and it says:

[root@localhost tcpdump-3.9.4]# rpm -q libpcap
libpcap-0.7.2-1

so it means I did't setup my libpcap-0.9.4 successfully. Now I think the problem is there is no function called pcpa_next_ex in libpcap-7.
So,what can I do now?? I what to delete the old libpcap, but the result is:

[root@localhost tcpdump-3.9.4]# rpm -e libpcap
error: Failed dependencies:
libpcap.so.0.6.2 is needed by (installed) ethereal-0.9.8-6
libpcap >= 0.6 is needed by (installed) ethereal-0.9.8-6

Please help me,how can I setup the new version of libpcap successfully??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
Several "find -exec" and "find | xargs" questions thanhvn Programming 4 12-02-2005 01:04 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Where can I find the "make" & "cc" packages?? sayeed_ather Mandriva 2 04-28-2004 02:02 AM
"host" ok, but "ping" can't find ip address hardigunawan Linux - Networking 2 05-16-2002 05:41 PM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration