I guess over the years i've already put dozens of hours into this, but i will never figure out how to do this correctly.
So why is the assert here, and how can i avoid it?
I don't see what i do differently than the demos.
- Code: Select all
void ndWorld::DeleteDeferredObjects()
{
// clean up all batched deleted objects, before update
while (m_deletedModels.GetCount())
{
D_TRACKTIME();
ndAssert(0); // <-
ndModel* const model = m_deletedModels.GetFirst()->GetInfo();
m_deletedModels.Remove(m_deletedModels.GetFirst());
model->m_deletedNode = nullptr;
ndModelList::ndNode* const worldNode = model->m_worldNode;
m_modelList.RemoveModel(worldNode->GetInfo());
}
Btw, updating Newton yesterday, there were compiler errors regarding threading. I could avoid them by using thread emulation, but now i get linker errors. So i can't run the demos to see what's new.
- Code: Select all
Build started...
1>------ Build started: Project: ndSandbox, Configuration: Release x64 ------
1>ndLeakTracker.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndConvexFractureModel_2.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndConvexFractureModel_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndDebugDisplay.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndExplodeConvexShapeModel.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndBasicParticleFluid.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndDemoEntity.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndDemoEntityManager.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>ndPhysicsWorld.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl ndSpinLock::Delay(int &)" (__imp_?Delay@ndSpinLock@@AEAAXAEAH@Z)
1>C:\dev\newton-dynamics-master\newton-4.00\applications\ndSandbox\Release\ndSandbox.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "ndSandbox.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 11 up-to-date, 0 skipped ==========
========== Build started at 8:29 AM and took 07.208 seconds ==========
I'm using default settings for CMake.