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. Adding external box2d Library to qt

Adding external box2d Library to qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 904 Views
  • 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 Offline
    F Offline
    fatih1
    wrote on last edited by
    #1

    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
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

      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
      0
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        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
        3
        • VRoninV VRonin

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

          F Offline
          F Offline
          fatih1
          wrote on last edited by
          #4

          @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
          0
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            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
            2

            • Login

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