有没有办法集成Qt和Physx,以便我可以在Qt Creator中使用Physx?
发布于 2014-04-19 13:05:37
不幸的是,PhysX是针对/MT (静态运行时版本)编译的,而Qt使用的是/MD。这意味着您必须使用/MT构建Qt静态构建。即使您让它使用Qt的共享版本运行,您也会遇到以下警告和可能的problems
defaultlib 'LIBCMT' conflicts with use of other libs...
此stackoverflow答案将帮助您开始qt静态构建:How to build Qt 4.8/5.2 statically under VS2012, using the static MSVC runtime, with Windows XP support?
要在qmake中使用PhysX库(MinGW与PhysX不兼容),下面是一个示例qmake配置。
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 \
-lPxTaskhttps://stackoverflow.com/questions/5906534
复制相似问题