LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Closed Thread
  Search this Thread
Old 05-10-2006, 09:25 PM   #1
zhuqlfeixia
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Rep: Reputation: 0
want to coThe problem when Impile my Qt program,help


Hi,bodies
Several days ago, I write a program to Sniffer on the network. And I used the libpcap to capture the packets. The program is under the console,so when I compile the program, I just write:

g++ -o myprogram myprogram.cpp -L/usr/local/libpcap-0.9.4 -lpcap -lnet -lpthread

Beacuse I used the libpcap,libnet,pthread, so I wrote -lpcap,-lnet,-lpthread. And my libpcap is in the /usr/local,so I wrote -L/usr/local/libpcap-0.9.4, then I compile it successfully.

But now, I want the program to be visualization, and I want to use Qt/KDE to finish it. So I use the "Qt Designer", but the problem appears, that is where should I write the scentence:
"-L/usr/local/libpcap-0.9.4 -lpcap -lnet -lpthread".

The method to compile the Qt program is:
First, make a new file named "main.cpp", then type the scentence below in the console to make a Makefile:
qmake -o Makefile myprogram.pro
Now type the "make" in the console to compile. At last type ./myprogram, the program should run successfully.

If the program is a simple one,the method above is OK,but I must use -lpcap,-lbnet,lpthread, and I don't know where to write it.
So some functions in the libpcap and libnet and so on is can't be compiled.
Could somebody tell me how to solve the problem?
Thanks.
 
Old 05-11-2006, 07:50 AM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Continue discussion here:

http://www.linuxquestions.org/questi...37#post2239937
 
  


Closed Thread


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
program problem megadeth Linux - Software 1 05-24-2005 09:58 PM
su program problem xaos5 Linux - Software 6 03-17-2005 01:02 PM
Problem with C program exvor Programming 27 01-04-2005 11:51 AM
Program Dependencies Problem DrakIE Linux - Newbie 7 04-05-2004 05:31 PM
C program problem.. Winter Programming 5 05-08-2002 05:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:18 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration