2013-02-15 86 views
1

我嘗試編譯PhysX物理sample使用MinGW的,但我發現這些錯誤:PhysX3使用MinGW - 鏈接錯誤

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文件中存儲這些方法?

回答

2

createProfileZoneManager()符號應該位於PhysXProfileSDK.lib

的PxDefaultErrorCallback()構造函數和析構函數符號確實應該在PhysX3Extensions.lib。您的編譯命令已經列出了這個庫兩次,但這不應該是一個問題。