Build qml box2d development environment

box2d is an excellent open source physics engine
box2d official website https://box2d.org/

qml box2d plug-in project
https://gitee.com/gao_yao_yao/qml-box2d

1. qml box2d plug-in project

  1. Download, unzip qml-box2d-master.zip, open box2d.pro with qt, compile Debug|Release
  2. Copy Box2D.dll|Box2Dd.dll to the qt installation directory. D:\Qt\Qt5.12.12\5.12.12\msvc2017\qml\Box2DThe Box2D folder needs to be created by yourself.
  3. Unzip the qmldir in qml-box2d-master.zip here
    Insert image description here
    . 4. Unzip the contents of qml-box2d-master.zip to D:\Qt\Qt5.12.12\5.12.12\msvc2017\include\Box2Dthe Box2D folder and create it yourself.

2. demo project

  1. Create a new demo project (Qt Quick)
  2. main.qml newimport Box2D 2.0
  3. Compilation and running pass, indicating that the environment setup is completed.

Guess you like

Origin blog.csdn.net/chen_227/article/details/133355483