Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to install socket.io boost library in qt
Qt 6.11 is out! See what's new in the release blog

How to install socket.io boost library in qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 5 Posters 2.1k Views 2 Watching
  • 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.
  • M Offline
    M Offline
    megha
    wrote on last edited by
    #1

    Hii, i am new to QT...
    Can anyone help me to install boost library .

    Thanks in advance

    Pablo J. RoginaP 1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Installing boost has nothing to do with Qt. You need to get it "the normal way" - on Linux you'll typically use your distributions package manager, for example.

      Then, to add boost to your Qt project (or any other library), you need to do 2 things:

      INCLUDEPATH += path/to/library/include
      LIBS+=-Lpath/to/lib -lnameOfLibrary
      

      (Z(:^

      VRoninV 1 Reply Last reply
      4
      • sierdzioS sierdzio

        Installing boost has nothing to do with Qt. You need to get it "the normal way" - on Linux you'll typically use your distributions package manager, for example.

        Then, to add boost to your Qt project (or any other library), you need to do 2 things:

        INCLUDEPATH += path/to/library/include
        LIBS+=-Lpath/to/lib -lnameOfLibrary
        
        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        Small side note to @sierdzio , most of boost is header only so there's a chance you don't even need the LIBS+= part

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        5
        • M Offline
          M Offline
          megha
          wrote on last edited by
          #4

          Then how to add the boost library to project in windows

          aha_1980A VRoninV 2 Replies Last reply
          0
          • M megha

            Then how to add the boost library to project in windows

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi @megha

            so where is your problem? What did you actually do so far?

            The steps @sierdzio and @VRonin explained are valid in Windows also.

            Regards

            Qt has to stay free or it will die.

            M 1 Reply Last reply
            2
            • M megha

              Then how to add the boost library to project in windows

              VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              http://doc.qt.io/qt-5/third-party-libraries.html
              http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              1 Reply Last reply
              2
              • aha_1980A aha_1980

                Hi @megha

                so where is your problem? What did you actually do so far?

                The steps @sierdzio and @VRonin explained are valid in Windows also.

                Regards

                M Offline
                M Offline
                megha
                wrote on last edited by
                #7

                @aha_1980 Thank you for reply,
                i had add included the path of rapidjson, websocketpp and boost library file in to my project to integrate socket.io in t my project, but I am getting error as
                "" F:\socket.io code\socketioconnection\websocketpp\transport\asio\connection.hpp:426: error: no matching function for call to 'make_shared(std::reference_wrapperboost::asio::io_context)'
                lib::ref(*io_service)); ""
                ^

                aha_1980A 1 Reply Last reply
                0
                • M megha

                  @aha_1980 Thank you for reply,
                  i had add included the path of rapidjson, websocketpp and boost library file in to my project to integrate socket.io in t my project, but I am getting error as
                  "" F:\socket.io code\socketioconnection\websocketpp\transport\asio\connection.hpp:426: error: no matching function for call to 'make_shared(std::reference_wrapperboost::asio::io_context)'
                  lib::ref(*io_service)); ""
                  ^

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi @megha,

                  Sorry I have no experience with that library.

                  • Can you explain how you installed socket.io?
                  • Please avoid paths with spaces and non-ASCII characters (socket.io code)
                  • Can you give a bit more information about the error? I.e. show your code where the error appears?

                  Regards

                  Qt has to stay free or it will die.

                  1 Reply Last reply
                  2
                  • M megha

                    Hii, i am new to QT...
                    Can anyone help me to install boost library .

                    Thanks in advance

                    Pablo J. RoginaP Offline
                    Pablo J. RoginaP Offline
                    Pablo J. Rogina
                    wrote on last edited by
                    #9

                    @megha said in How to install socket.io boost library in qt:

                    Can anyone help me to install boost library

                    Initially I'd say "this is not related to Qt at all..." However, since it's always good know how to integrate 3rd party libraries within Qt applications, I'd say let's give it a try.

                    By searching for "socket.io boost library" turned out that there's no socket.io compoment from Boost itself, but a sockect.io C++ client based on Boost and WebSocket++ libraries.

                    One good thing for that socket.io C++ client is that it has a detailed step by step example of a Qt based chat application. One thing though regarding that tutorial is that it assumes you already have Boost properly installed, which seems not to be your case.

                    Have you followed this socket.io C++ client installation steps?
                    In particular, the "Boost setup section"?

                    And if Boost installation/setup keeps giving you headaches, you may want to take a look at this socket.io C++ client without Boost, which also includes a Qt example.

                    Upvote the answer(s) that helped you solve the issue
                    Use "Topic Tools" button to mark your post as Solved
                    Add screenshots via postimage.org
                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                    1 Reply Last reply
                    4

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved