带有MinGW的PhysX3-链接错误

PhysX3 with MinGW - linking error

本文关键字:链接 错误 PhysX3- MinGW 带有      更新时间:2023-10-16

我正试图使用MinGW编译PhysX示例,但我遇到了以下错误:

undefined reference to `physx::PxProfileZoneManager::createProfileZoneManager(physx::PxFoundation*)'
undefined reference to `physx::PxDefaultErrorCallback::~PxDefaultErrorCallback()'
undefined reference to `physx::PxDefaultErrorCallback::PxDefaultErrorCallback()'

我的编译命令:

g++.exe -o Test.exe Test.cpp -Iinc -Llib -lPhysX3Common_x86 -lPhysX3_x86 -lPhysX3Extensions -lfreeglut -lopengl32 -lPhysX3Extensions -lglu32

现在我的问题是:这些方法存储在哪个.lib文件中?

createProfileZoneManager()符号应在PhysXProfileSDK.lib.中

PxDefaultErrorCallback()构造函数和析构函数符号确实应该在PhysX3Extensions.lib中。您的编译命令已经列出了两次lib,但这应该不是问题。