Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    How to add winpcap to QT proj

    General and Desktop
    4
    6
    5709
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      Ivan Filko last edited by

      Hi, I am writing an application that works with WinPcap. Problem with the addition of the library. I have download winpcap.exe and wdkpack.
      Make this:
      INCLUDEPATH += C:\Program Files\WinPcap\WpdPack\Include
      LIBS += C:\Program Files\WinPcap\WpdPack\Lib -lwpcap - lpacket

      but it gave me mistace, that "can't find file"...

      #include "pcap.h" - dosen't work =(

      I have low level of knowlege in QT, please help me add this lib.

      P.S. Please give a detailed explanation

      1 Reply Last reply Reply Quote 0
      • C
        Code_ReaQtor last edited by

        The problem is the "space" between "Program Files".

        I can't recall any links on that matter, but I think it still exists here on this forum.

        EDIT: "Here":http://qt-project.org/doc/qt-4.8/qmake-project-files.html#whitespace it is! Hope it helps.

        Please visit my open-source projects at https://github.com/Code-ReaQtor.

        1 Reply Last reply Reply Quote 0
        • K
          koahnig last edited by

          welcome to devnet

          You should change the separator of your path to a forward slash ('/') instead of the backslash ('').
          @
          INCLUDEPATH += "C:/Program Files/WinPcap/WpdPack/Include"
          LIBS += "C:/Program Files/WinPcap/WpdPack/Lib" -lwpcap – lpacket
          @

          The backslash is used as line continuation indicator. Windows understands both anyway and it is common practice with Qt to use always the forward slash.

          I think you need also the quotation marks.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply Reply Quote 0
          • I
            Ivan Filko last edited by

            Thanks, but it did not help.
            [quote author="koahnig" date="1366540475"]welcome to devnet

            You should change the separator of your path to a forward slash ('/') instead of the backslash ('').
            @
            INCLUDEPATH += "C:/Program Files/WinPcap/WpdPack/Include"
            LIBS += "C:/Program Files/WinPcap/WpdPack/Lib" -lwpcap – lpacket
            @

            The backslash is used as line continuation indicator. Windows understands both anyway and it is common practice with Qt to use always the forward slash.

            I think you need also the quotation marks. [/quote]

            1 Reply Last reply Reply Quote 0
            • I
              Ivan Filko last edited by

              Thanks, it work!!!
              [quote author="koahnig" date="1366540475"]welcome to devnet

              You should change the separator of your path to a forward slash ('/') instead of the backslash ('').
              @
              INCLUDEPATH += "C:/Program Files/WinPcap/WpdPack/Include"
              LIBS += "C:/Program Files/WinPcap/WpdPack/Lib" -lwpcap – lpacket
              @

              The backslash is used as line continuation indicator. Windows understands both anyway and it is common practice with Qt to use always the forward slash.

              I think you need also the quotation marks. [/quote]

              1 Reply Last reply Reply Quote 0
              • G
                gilgil last edited by

                I hope it will help you.

                @
                WINPCAP_PATH = $$PWD/../../winpcap
                INCLUDEPATH += $${WINPCAP_PATH}/Include
                win32:contains(QMAKE_TARGET.arch, x86_64) {
                LIBS += -L$${WINPCAP_PATH}/Lib/x64
                } else {
                LIBS += -L$${WINPCAP_PATH}/Lib
                }
                @

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post