IrrODE - an Irrlicht - ODE wrapper (now with SVN)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

You could try ISceneManager::addToDeletionQueue instead of removing the node directly. That way it will be removed once it's safe to do so.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Lonesome Crow
Posts: 4
Joined: Tue May 03, 2011 7:03 pm

Post by Lonesome Crow »

Ok! Let's be more specific...

After trying your tip, the same error remained. So, I decided to read and understand how "ISceneManager::addToDeletionQueue" works. And I found something strange...

What I want to do is simply to remove an object immediately after its creation, only to learn how could I create destructible physical objects on my simulation. Here is my code:

Code: Select all

        CIrrOdeSurfaceParameters g_pParams2;
	g_pParams2.setMode(dContactBounce | dContactSoftERP | dContactSoftCFM | dContactSlip1 | dContactSlip2);
	g_pParams2.setMu(dInfinity);
	g_pParams2.setMu2(0);
	g_pParams2.setBounce((dReal)0.6);
	g_pParams2.setBounceVel(1e-9f);
	g_pParams2.setSoftCfm(0.005f);
	g_pParams2.setSoftErp(0.00005f);
	g_pParams2.setSlip1(1.0f);
	g_pParams2.setSlip2(1.0f);

	ISceneNode* irrNode = smgr->addSceneNode(CIrrOdeSceneNode::nodeNameToC8(IRR_ODE_BODY_NAME), worldNode);

	CIrrOdeBody *pBody = reinterpret_cast<CIrrOdeBody *>(irrNode);

	pBody->setPosition(vector3df(5.0,15.0f,5.0f));

	IAnimatedMesh *Mesh;
	IAnimatedMeshSceneNode *Node;

	Mesh = smgr->getMesh("../../media/sphere.3ds");
	Node = smgr->addAnimatedMeshSceneNode(Mesh, pBody);
	Node->setMaterialTexture(0, driver->getTexture("../../media/arizona.png"));
	Node->setMaterialFlag(EMF_LIGHTING, false);
	Node->addShadowVolumeSceneNode();

	ISceneNode* irrSphere = smgr->addSceneNode(CIrrOdeSceneNode::nodeNameToC8(IRR_ODE_GEOM_SPHERE_NAME), Node);
	CIrrOdeGeomSphere *pSphere = reinterpret_cast<CIrrOdeGeomSphere *>(irrSphere);

	pSphere->setMassTotal(0.5f);
	pSphere->setSurfaceParameters(&g_pParams2, 0);
	pSphere->drop();

	pBody->initPhysics();
	pBody->drop();

	smgr->addToDeletionQueue(pBody);
The object is successfully created and the physics works well. I get problems only when I put the last line, trying to delete it.

As I could understand, "ISceneManager::addToDeletionQueue"puts the object on Deletion Queue and, when the deletion event is launched, doRemoveFromPhysics is called, safely removing all things in the right order and time.

If I understood right, the code I wrote should work. However, the code of "doRemoveFromPhysics" has something strange:

Code: Select all

void CIrrOdeBody::doRemoveFromPhysics() {
  CIrrOdeSceneNode::removeFromPhysics();
  if (m_iBodyId) {
    if (m_pWorld)
       m_pWorld->removeBody(this);
    m_pOdeManager->removeTreeFromPhysics(this);
    m_pOdeManager->removeOdeSceneNode(this);

    m_pOdeDevice->bodyDestroy(m_iBodyId);
    m_iBodyId=0;

  }
  else if (!m_bPhysicsInitialized && m_pWorld!=NULL) m_pWorld->removeBody(this);
}
"CIrrOdeSceneNode::removeFromPhysics()" removes the body from the "m_pSceneNodes" list but, five lines after, the same thing is made again on "m_pOdeManager->removeOdeSceneNode(this)"... This is redundant, but don't causes any error, it's only extra work.

Analysing each call on "doRemoveFromPhysics", all lists that would have removed objects, apparently have the right objects deleted. However, I'm still getting a "segmentation fault" or "ODE INTERNAL ERROR 2: Bad argument(s) in dGeomSetBody()" when "ISceneManager::drawAll" is called.
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Hmm ... I never tried to remove a node right after I added it ... I'll try that when I'm back from vacation next week. Maybe you could share your complete project with me, this would make it easier to reproduce the problem.

I'm actually not quite sure why the removal code is like this, haven't touched it for months ;)
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
newleon
Posts: 19
Joined: Mon Jan 10, 2011 7:59 am
Location: Pohang, South Korea
Contact:

Post by newleon »

Brainsaw
I solved the "no world!" problem. I found the way to recompile ode-0.11.1 to build ode_singled.lib instead of ode_doubled.lib. Now I can compile the helloOdeWorld but I have still problem with IrrOdeCar. There is following error:
fatal error C1083: Cannot open include file: 'CAdvancedParticleSystemNode.h': No such file or directory
I couldn't find it neither in "irrode" folder nor "ode-0.11.1" folder. Do you have any idea?

EDIT: This is how I solved the "no world!" problem. Actually it has nothing to do with the wrapper. I just changed the way I compiled the original ode-0.11.1 under VS2008 through Configuration Manager.
Image

Image

Image
Last edited by newleon on Sat May 07, 2011 12:01 pm, edited 1 time in total.
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Argh ... I think I should *really* include this code snippet into the download package. Before I can do so you should download the "AdvancedParticleSceneNode" from my homepage (http://bulletbyte.de/products.php?sub=irr&show=aps) and include it into your structure. Should work then.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Lonesome Crow
Posts: 4
Joined: Tue May 03, 2011 7:03 pm

Post by Lonesome Crow »

Ok! Hope we can get it to work! :)

You can download my project at: http://www.lia.ufc.br/~yuri/irrodetest.zip

It's very simple, only a test trying to put and than remove a sphere in a world with a terrain constructed from a heightmap.

By the way... I get the "no world!" message too, but to me this was not a problem until now. The physics apparently works fine.
newleon
Posts: 19
Joined: Mon Jan 10, 2011 7:59 am
Location: Pohang, South Korea
Contact:

linking error

Post by newleon »

Brainsaw
Thanks for the download link for "advancedparticlenode". This time I get linking errors as this:

Code: Select all

1>------ Rebuild All started: Project: myIrrOde01, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'myIrrOde01', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>c:\irrode\include\irrode\cserializer.h(148) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\irrode\include\irrode\cserializer.h(273) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\irrode\include\irrode\event\cirrodeeventbodymoved.h(50) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\irrode\include\irrode\event\cirrodeeventbodymoved.h(51) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\irrode\include\irrode\event\cirrodeeventbodymoved.h(52) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\irrode\include\irrode\event\cirrodeeventbodymoved.h(53) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\irrode\include\irrode\event\cirrodeeventbodymoved.h(54) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>LINK : C:\Users\newleon\Documents\Visual Studio 2008\Projects\myIrrOde01\Debug\myIrrOde01.exe not found or not built by the last incremental link; performing full link
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CConfigFileManager::writeConfig(class irr::IrrlichtDevice *,char const *)" (?writeConfig@CConfigFileManager@@QAEXPAVIrrlichtDevice@irr@@PBD@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CConfigFileManager::loadConfig(class irr::IrrlichtDevice *,char const *)" (?loadConfig@CConfigFileManager@@QAEXPAVIrrlichtDevice@irr@@PBD@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CHeli::CHeli(class irr::IrrlichtDevice *,class irr::scene::ISceneNode *,class CIrrCC *)" (??0CHeli@@QAE@PAVIrrlichtDevice@irr@@PAVISceneNode@scene@2@PAVCIrrCC@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CTank::CTank(class irr::IrrlichtDevice *,class irr::scene::ISceneNode *,class CIrrCC *)" (??0CTank@@QAE@PAVIrrlichtDevice@irr@@PAVISceneNode@scene@2@PAVCIrrCC@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CPlane::CPlane(class irr::IrrlichtDevice *,class irr::scene::ISceneNode *,class CIrrCC *)" (??0CPlane@@QAE@PAVIrrlichtDevice@irr@@PAVISceneNode@scene@2@PAVCIrrCC@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CMenu::addButtonForState(class CIrrOdeCarState *)" (?addButtonForState@CMenu@@QAEXPAVCIrrOdeCarState@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CIrrOdeCarState::setFpsInfo(class irr::gui::IGUIStaticText *)" (?setFpsInfo@CIrrOdeCarState@@QAEXPAVIGUIStaticText@gui@irr@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CCar::CCar(class irr::IrrlichtDevice *,class irr::scene::ISceneNode *,class CIrrCC *)" (??0CCar@@QAE@PAVIrrlichtDevice@irr@@PAVISceneNode@scene@2@PAVCIrrCC@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CController::CController(class irr::IrrlichtDevice *,class CIrrCC *)" (??0CController@@QAE@PAVIrrlichtDevice@irr@@PAVCIrrCC@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CMenu::CMenu(class irr::IrrlichtDevice *,class CIrrCC *)" (??0CMenu@@QAE@PAVIrrlichtDevice@irr@@PAVCIrrCC@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CAdvancedParticleSystemNodeFactory::CAdvancedParticleSystemNodeFactory(class irr::scene::ISceneManager *)" (??0CAdvancedParticleSystemNodeFactory@@QAE@PAVISceneManager@scene@irr@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CRandomForestFactory::CRandomForestFactory(class irr::scene::ISceneManager *)" (??0CRandomForestFactory@@QAE@PAVISceneManager@scene@irr@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CIrrCC::createFader(unsigned int,unsigned int,unsigned int,float)" (?createFader@CIrrCC@@QAEXIIIM@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CIrrCC::createAxis(unsigned int,unsigned int)" (?createAxis@CIrrCC@@QAEXII@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall CIrrCC::addItem(unsigned int,class irr::core::string<wchar_t,class irr::core::irrAllocator<wchar_t> >,enum irr::EKEY_CODE,enum CIrrCC::eControllerType)" (?addItem@CIrrCC@@QAEIIV?$string@_WV?$irrAllocator@_W@core@irr@@@core@irr@@W4EKEY_CODE@4@W4eControllerType@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CConfigFileManager::addWriter(class IConfigFileWriter *)" (?addWriter@CConfigFileManager@@QAEXPAVIConfigFileWriter@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CConfigFileManager::addReader(class IConfigFileReader *)" (?addReader@CConfigFileManager@@QAEXPAVIConfigFileReader@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: static class CConfigFileManager * __cdecl CConfigFileManager::getSharedInstance(void)" (?getSharedInstance@CConfigFileManager@@SAPAV1@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CIrrCC::setAllowMouse(bool)" (?setAllowMouse@CIrrCC@@QAEX_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CIrrCC::setAllowFKeys(bool)" (?setAllowFKeys@CIrrCC@@QAEX_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CIrrCC::CIrrCC(class irr::IrrlichtDevice *)" (??0CIrrCC@@QAE@PAVIrrlichtDevice@irr@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CCustomEventReceiver::install(void)" (?install@CCustomEventReceiver@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: static class CCustomEventReceiver * __cdecl CCustomEventReceiver::getSharedInstance(void)" (?getSharedInstance@CCustomEventReceiver@@SAPAV1@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CCustomEventReceiver::setMembers(class irr::IrrlichtDevice *,class irr::ode::CIrrOdeManager *)" (?setMembers@CCustomEventReceiver@@SAXPAVIrrlichtDevice@irr@@PAVCIrrOdeManager@ode@3@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class irr::IrrlichtDevice * __thiscall CSettings::createDeviceFromSettings(void)" (?createDeviceFromSettings@CSettings@@QAEPAVIrrlichtDevice@irr@@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall CSettings::run(void)" (?run@CSettings@@QAEIXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSettings::addValidDriver(wchar_t const *,enum irr::video::E_DRIVER_TYPE)" (?addValidDriver@CSettings@@QAEXPB_WW4E_DRIVER_TYPE@video@irr@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CSettings::CSettings(char const *,wchar_t const *,class irr::video::SColor)" (??0CSettings@@QAE@PBDPB_WVSColor@video@irr@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CProgressBar::CProgressBar(class irr::gui::IGUIEnvironment *,class irr::core::rect<int> const &,int,class irr::gui::IGUIElement *)" (??0CProgressBar@@QAE@PAVIGUIEnvironment@gui@irr@@ABV?$rect@H@core@3@HPAVIGUIElement@23@@Z) referenced in function "public: __thiscall CProgress::CProgress(class irr::IrrlichtDevice *)" (??0CProgress@@QAE@PAVIrrlichtDevice@irr@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall CProgressBar::setProgress(unsigned int)" (?setProgress@CProgressBar@@QAEXI@Z) referenced in function "public: virtual bool __thiscall CProgress::onEvent(class irr::ode::IIrrOdeEvent *)" (?onEvent@CProgress@@UAE_NPAVIIrrOdeEvent@ode@irr@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CRandomForestFactory::~CRandomForestFactory(void)" (??1CRandomForestFactory@@UAE@XZ) referenced in function "public: void __thiscall CRandomForestFactory::`vbase destructor'(void)" (??_DCRandomForestFactory@@QAEXXZ)
1>C:\Users\newleon\Documents\Visual Studio 2008\Projects\myIrrOde01\Debug\myIrrOde01.exe : fatal error LNK1120: 31 unresolved externals
1>Build log was saved at "file://c:\Users\newleon\Documents\Visual Studio 2008\Projects\myIrrOde01\myIrrOde01\Debug\BuildLog.htm"
1>myIrrOde01 - 32 error(s), 7 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
It is obviously related to linked libraries. I think it means I need to add another .lib file. But which library I don't know. Currently I added "Irrlicht.lib ode_singled.lib libIrrOde.lib", I don't know what else is needed.
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Damnit ... can you check the VC projects for missing .h and .cpp files? Maybe I have forgotten to include some of those, as I hardly use VC apart from creating IrrEdit plugins.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

This is just a little update. I have added another force to the CIrrOdeAeroDrag motor used in planes. The new force uses a fraction of the uplift and sideward damp forces applied to the airplane to push it foreward. With this modification it is quite easy to fly a looping (this was almost impossible before).
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Kordman916
Posts: 23
Joined: Sat Apr 03, 2010 3:44 am

Linux Irrode Errors

Post by Kordman916 »

Everytime I attempt to compile/build the irrodecar project using Code::Blocks 10.05 and Ubuntu 11.04 I get these errors

Code: Select all

.objs/source/IrrOdeCar/CCar.o||In function `CCar::CCar(irr::IrrlichtDevice*, irr::scene::ISceneNode*, CIrrCC*)':|
CCar.cpp|| undefined reference to `typeinfo for irr::ode::CIrrOdeMotor'|
CCar.cpp|| undefined reference to `typeinfo for irr::ode::CIrrOdeMotor'|
CCar.cpp|| undefined reference to `typeinfo for irr::ode::CIrrOdeServo'|
CCar.cpp|| undefined reference to `typeinfo for irr::ode::CIrrOdeServo'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
.objs/source/IrrOdeCar/CCar.o||In function `CCar::~CCar()':|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
.objs/source/IrrOdeCar/CCar.o||In function `CCar::deactivate()':|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setVelocity(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setForce(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeServo::setServoPos(float)'|
.objs/source/IrrOdeCar/CCar.o||In function `CCar::update()':|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getLinearVelocity()'|
.objs/source/IrrOdeCar/CCar.o||In function `CCar::onEvent(irr::ode::IIrrOdeEvent*)':|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setVelocity(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setForce(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setVelocity(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setForce(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeServo::setServoPos(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeServo::setServoPos(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setVelocity(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeMotor::setForce(float)'|
CCar.cpp|| undefined reference to `irr::ode::CIrrOdeBody::addForceAtPosition(irr::core::vector3d<float>, irr::core::vector3d<float>)'|
.objs/source/IrrOdeCar/CHeli.o||In function `CHeli::CHeli(irr::IrrlichtDevice*, irr::scene::ISceneNode*, CIrrCC*)':|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getStepMotorFromName(char const*)'|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getStepMotorFromName(char const*)'|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getStepMotorFromName(char const*)'|
.objs/source/IrrOdeCar/CHeli.o||In function `CHeli::~CHeli()':|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
.objs/source/IrrOdeCar/CHeli.o||In function `CHeli::update()':|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getLinearVelocity()'|
.objs/source/IrrOdeCar/CHeli.o||In function `CHeli::onEvent(irr::ode::IIrrOdeEvent*)':|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getLinearVelocity()'|
CHeli.cpp|| undefined reference to `irr::ode::CIrrOdeBody::addForceAtPosition(irr::core::vector3d<float>, irr::core::vector3d<float>)'|
.objs/source/IrrOdeCar/CIrrOdeCarState.o||In function `CIrrOdeCarState::OnEvent(irr::SEvent const&)':|
CIrrOdeCarState.cpp|| undefined reference to `irr::ode::CIrrOdeRecorder::CIrrOdeRecorder(irr::IrrlichtDevice*, char const*)'|
CIrrOdeCarState.cpp|| undefined reference to `irr::ode::CIrrOdeRecorder::startRecording()'|
CIrrOdeCarState.cpp|| undefined reference to `irr::ode::CIrrOdeRecorder::stopRecording()'|
CIrrOdeCarState.cpp|| undefined reference to `irr::ode::CIrrOdeRecorder::saveRecording(char const*)'|
CIrrOdeCarState.cpp|| undefined reference to `irr::ode::CIrrOdeRecorder::~CIrrOdeRecorder()'|
.objs/source/IrrOdeCar/CPlane.o||In function `CPlane::CPlane(irr::IrrlichtDevice*, irr::scene::ISceneNode*, CIrrCC*)':|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getMotorFromName(char const*)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getStepMotorFromName(char const*)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getStepMotorFromName(char const*)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getStepMotorFromName(char const*)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getChildBodyFromName(char const*)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getChildBodyFromName(char const*)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
.objs/source/IrrOdeCar/CPlane.o||In function `CPlane::~CPlane()':|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
.objs/source/IrrOdeCar/CPlane.o||In function `CPlane::update()':|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getLinearVelocity()'|
.objs/source/IrrOdeCar/CPlane.o||In function `CPlane::onEvent(irr::ode::IIrrOdeEvent*)':|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeServo::setServoPos(float)'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getID()'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getLinearVelocity()'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::getLinearVelocity()'|
CPlane.cpp|| undefined reference to `irr::ode::CIrrOdeBody::addForceAtPosition(irr::core::vector3d<float>, irr::core::vector3d<float>)'|
.objs/source/IrrOdeCar/CProjectile.o||In function `CProjectile::CProjectile(irr::scene::ISceneManager*, irr::core::vector3d<float>, irr::core::vector3d<float>, irr::core::vector3d<float>, char const*, int, irr::scene::ISceneNode*, bool)':|
CProjectile.cpp|| undefined reference to `irr::ode::CIrrOdeManager::getSharedInstance()'|
CProjectile.cpp|| undefined reference to `irr::ode::CIrrOdeManager::cloneTree(irr::scene::ISceneNode*, irr::scene::ISceneNode*, irr::scene::ISceneManager*)'|
CProjectile.cpp|| undefined reference to `irr::ode::CIrrOdeBody::setLinearVelocity(irr::core::vector3d<float>)'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
Anyone Know what the problem might be?
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Are you sure you link agains the irrode lib? Seems that all IrrOde objects are undefined. I guess you'll have to adapt the Code::Blocks project file.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Kordman916
Posts: 23
Joined: Sat Apr 03, 2010 3:44 am

Post by Kordman916 »

I have it linked.

Whats the proper way of building IrrOde in Linux?
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

It should work the same way as under Windows. I think there's a Linux build target included, but it might not be up to date. As I don't have Linux there might be some headers or source files missing.

Btw: are you using the .a file that comes with the download package? That won't work, it's a Windows lib file created with MinGW.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I have uploaded a new version of the IrrODE wrapper. This time I modified the IrrOdeCar demo (again), I added an autopilot feature to the airplanes. You need to start them, bring them to some altitude and activate the autopilot (Default key: "P"). The planes will then fly to some marks on the map (you can see some fire in the air (without smoke on the water though) at those points) by random. Yesterday I was just sitting in front of my computer watching the planes fly for about 20 minutes, then I took control over one of them and tried to hit the other two with the plane's gun.

Next planned steps: advance the autopilot so that the planes can also start on their own and modify the missiles to a heatseaking version. Just for the fun of it :D
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Just uploaded a new version with two enhancements:

added a free camera when no vehilce is selected. It can be controlled using the mouse buttons and moving the mouse

fixed a bug in the autopilot: sometimes invalid values were passed causing a crash in the ODE
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply