Hello, folks.

Here I have a problem.
I was planning to make some kind of sniffer, just for practising. And so I started facing problems from the setup.

So, basically program does not start.

.pro file

Qt Code:
  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2017-03-16T17:23:52
  4. #
  5. #-------------------------------------------------
  6.  
  7. QT += core gui
  8.  
  9. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  10.  
  11. TARGET = untitled
  12. TEMPLATE = app
  13. #CONFIG += c++11
  14. INCLUDEPATH += E:/lib/PcapPlusPlus-17.02-windows-mingw32-gcc-5.3.0/header
  15. LIBS += E:/lib/PcapPlusPlus-17.02-windows-mingw32-gcc-5.3.0/Pcap++.lib
  16. LIBS += E:/lib/PcapPlusPlus-17.02-windows-mingw32-gcc-5.3.0/Packet++.lib
  17. LIBS += E:/lib/PcapPlusPlus-17.02-windows-mingw32-gcc-5.3.0/Common++.lib
  18.  
  19. INCLUDEPATH += E:/lib/WpdPack/Include
  20. LIBS += -LE:/lib/WpdPack/Lib -lwpcap -lpacket
  21. LIBS += -lpthread
  22. LIBS += -lws2_32
  23. LIBS += -liphlpapi
  24. LIBS += -static-libgcc -static-libstdc++
  25.  
  26. SOURCES += main.cpp\
  27. sniffer.cpp
  28.  
  29. HEADERS += sniffer.h
  30.  
  31. FORMS += sniffer.ui
To copy to clipboard, switch view to plain text mode 

then goes sniffer.h

Qt Code:
  1. #ifndef SNIFFER_H
  2. #define SNIFFER_H
  3. #include <winsock2.h>
  4. #include <QMainWindow>
  5.  
  6. namespace Ui {
  7. class Sniffer;
  8. }
  9.  
  10. class Sniffer : public QMainWindow
  11. {
  12. Q_OBJECT
  13.  
  14. public:
  15. explicit Sniffer(QWidget *parent = 0);
  16. ~Sniffer();
  17.  
  18. private slots:
  19. void on_pushButton_2_clicked();
  20.  
  21. private:
  22. Ui::Sniffer *ui;
  23. };
  24.  
  25. #endif // SNIFFER_H
To copy to clipboard, switch view to plain text mode 

.cpp

Qt Code:
  1. #include "sniffer.h"
  2. #include "ui_sniffer.h"
  3.  
  4. #include <MacAddress.h>
  5. #include <IpAddress.h>
  6. #include <PlatformSpecificUtils.h>
  7. #include <PcapLiveDeviceList.h>
  8. #include <PcapLiveDevice.h>
  9. #include <EthLayer.h>
  10. #include <ArpLayer.h>
  11. #include <Logger.h>
  12. #include <QMessageBox>
  13.  
  14. using namespace pcpp;
  15. Sniffer::Sniffer(QWidget *parent) :
  16. QMainWindow(parent),
  17. ui(new Ui::Sniffer)
  18. {
  19. ui->setupUi(this);
  20. }
  21.  
  22. Sniffer::~Sniffer()
  23. {
  24. delete ui;
  25. }
  26.  
  27. void Sniffer::on_pushButton_2_clicked()
  28. {
  29. const std::vector <PcapLiveDevice*>& a = PcapLiveDeviceList::getInstance().getPcapLiveDevicesList();
  30. /*QString showme(*a[0]->getName());
  31.   QMessageBox::information(this, "info",showme);*/
  32. }
To copy to clipboard, switch view to plain text mode 

and main

Qt Code:
  1. #include "sniffer.h"
  2. #include <QApplication>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. Sniffer w;
  8. w.show();
  9.  
  10. return a.exec();
  11. }
To copy to clipboard, switch view to plain text mode 


so there's just 1 button and some headers.

I was using dll for pthreads from somewhere here

https://sourceforge.net/p/mingw-w64/...le%20pthreads/

which I copied to /mingw53_32/bin

precompiled pcapplusplus from.. here

http://seladb.github.io/PcapPlusPlus-Doc/download.html

and winpcap-dev from their site.

when I try to run the app, it appears in memory, visible in taskmgr, but window with my fancy button doesn't show.

Hope to your assistance, folks