Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Adding external box2d Library to qt

    General and Desktop
    3
    5
    467
    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.
    • F
      fatih1 last edited by

      Hello, I wanted to add a physics simulation engine to qt. The external library is written in c++ and some people already implemented it but how can I include it to my project

      UNfortunately, there is not much information about that

      Thanks for your help

      https://box2d.org/

      1 Reply Last reply Reply Quote 0
      • gde23
        gde23 last edited by

        As can be seen on the github-repo you need to compile the library as described here: https://github.com/erincatto/box2d
        After that you create your Qt project and add the libraries /include path to your project. Now you can implement your stuff using the classes from the lib and finally you need to link the lib in your qmake/CMake project file. So there isn't really any Qt involved here.

        1 Reply Last reply Reply Quote 0
        • VRonin
          VRonin last edited by

          Old but still valid: https://www.qt.io/blog/2010/02/26/qt-box2d-is-easy

          "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

          F 1 Reply Last reply Reply Quote 3
          • F
            fatih1 @VRonin last edited by

            @VRonin How can I build it without qt
            i guess it is done with cmake but i have no idea how

            1 Reply Last reply Reply Quote 0
            • VRonin
              VRonin last edited by

              Just download and install CMake, then in Qt Creator settings make sure it detected the CMake installation and just open the project with Qt Creator

              "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 Reply Quote 2
              • First post
                Last post