开发者

QT Creator integration with Physx

开发者 https://www.devze.com 2023-03-03 00:04 出处:网络
Is there any way to integrate Qt and Physx so i can use Physx insi开发者_StackOverflow中文版de Qt Creator?Unfortunately PhysX is compiled against the /MT (static run-time version), while Qt MSVC uses

Is there any way to integrate Qt and Physx so i can use Physx insi开发者_StackOverflow中文版de Qt Creator?


Unfortunately PhysX is compiled against the /MT (static run-time version), while Qt MSVC uses /MD. Meaning you will have to build a Qt MSVC static build with /MT. Even if you get it to run using Qt's shared version you will run into the following warning and possible problems:

defaultlib 'LIBCMT' conflicts with use of other libs...

This stackoverflow answer will help you get you started for a qt static build: How to build Qt 4.8/5.2 statically under VS2012, using the static MSVC runtime, with Windows XP support?

To use the PhysX library with Qt MSVC (MinGW is not compatible with PhysX), here's an example qmake configuration.

PHYSX = /path/to/physx/library

INCLUDEPATH += $${PHYSX}/Include
LIBS += -L$${PHYSX}/Lib/win64

LIBS += \
    -lPhysX3CharacterKinematic_x64 \
    -lPhysX3_x64 \
    -lPhysX3Common_x64 \
    -lPhysX3Cooking_x64 \
    -lPhysX3Extensions \
    -lPhysX3Vehicle \
    -lPhysXProfileSDK \
    -lPhysXVisualDebuggerSDK \
    -lPxTask
0

精彩评论

暂无评论...
验证码 换一张
取 消