Results 1 to 4 of 4

Thread: Static application missing pcap functionality

  1. #1
    Join Date
    Apr 2009
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Static application missing pcap functionality

    Hi,

    I have a static application that is missing functionality.

    I have managed to build and install Qt ( qt-x11-opensource-src-4.5.0.tar.gz ) on ubuntu 8.04 following this tutorial :
    http://wiki.qtcentre.org/index.php?t...ic_Qt_on_Linux

    The application is a simple sniffer that uses libpcap .After i build the application with "qmake" and "make", I tested it on another system but the application doesn't seem to capture anything,other functions seem fine. Therefore suspect the problem lies with libpcap.

    The following is the steps i used:
    Qt Code:
    1. 1. Install libpcap files with "sudo apt-get install libpcap0.8-dev"
    2.  
    3. 2. Building Qt static
    4.  
    5. sudo apt-get install libx11-dev libfreetype6-dev libavahi-gobject-dev libSM-dev libXrender-dev libfontconfig-dev libXext-dev
    6. (* I can only get pass the ./configure step after I've installed the above......)
    7.  
    8. ./configure -static -release -nomake demos -nomake examples -nomake tools
    9. make
    10. sudo make install
    11.  
    12. 3. Building the application:
    13.  
    14. add to .pro file:
    15. CONFIG += static
    16. LIBS += -L/usr/lib -lpcap
    17.  
    18. export PATH="$PATH:/usr/local/Trolltech/Qt-4.5.0/bin"
    19. qmake
    20. make
    To copy to clipboard, switch view to plain text mode 

    everything seems fine..no errors noticed...but I can't figure out what went wrong.....

    Is there any solution or something that I've missed?

    Please advice...

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Static application missing pcap functionality

    Maybe the problem is with access right? Did you try running the application as root? Or running it on yet another machine?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2012
    Posts
    2
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Static application missing pcap functionality

    hi
    i am waleed i really need ur help i am maknig a program that is used to froweard stored packets on disk drive
    using qt and libpcap in linux i get error while compiling that "undefined refrence to pcap_loop() and pcap_open_offline()
    how can i fix this problem?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Static application missing pcap functionality

    Make sure you link your application against libpcap.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. I Can't use QtCreator to static build my application
    By kyosold in forum Installation and Deployment
    Replies: 3
    Last Post: 6th January 2009, 10:20
  2. Compiling static application
    By Benjamin in forum Qt for Embedded and Mobile
    Replies: 9
    Last Post: 23rd December 2008, 11:45
  3. Static application MSVC 2005 no image
    By bitChanger in forum Installation and Deployment
    Replies: 2
    Last Post: 26th August 2008, 13:06
  4. Replies: 16
    Last Post: 23rd May 2008, 10:12
  5. Please Help-->have few doubts with Static build in Windows !
    By Krish in forum Installation and Deployment
    Replies: 1
    Last Post: 17th March 2008, 14:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.