Whats wrong here?
[EMAIL PROTECTED] ~/media/programming/c++/game/cs/cel/cel $ jam
...found 732 target(s)...
...updating 1 target(s)...
LinkApplication hovertest
./out/linuxx86/optimize/apps/hovertest/behave.o: In function
`htBehaviourActor::~htBehaviourActor()':
behave.cpp:(.text+0xbe): undefined reference to
`htBehaviourActor::scfRemoveRefOwners()'
./out/linuxx86/optimize/apps/hovertest/behave.o: In function
`htBehaviourActor::~htBehaviourActor()':
behave.cpp:(.text+0xe3): undefined reference to
`htBehaviourActor::scfRemoveRefOwners()'
./out/linuxx86/optimize/apps/hovertest/behave.o: In function
`htBehaviourActor::~htBehaviourActor()':
behave.cpp:(.text+0x104): undefined reference to
`htBehaviourActor::scfRemoveRefOwners()'
./out/linuxx86/optimize/apps/hovertest/behave.o:
(.gnu.linkonce.r._ZTV16htBehaviourActor+0x24): undefined reference to
`htBehaviourActor::IncRef()'
./out/linuxx86/optimize/apps/hovertest/behave.o:
(.gnu.linkonce.r._ZTV16htBehaviourActor+0x28): undefined reference to
`htBehaviourActor::DecRef()'
./out/linuxx86/optimize/apps/hovertest/behave.o:
(.gnu.linkonce.r._ZTV16htBehaviourActor+0x2c): undefined reference to
`htBehaviourActor::GetRefCount()'
./out/linuxx86/optimize/apps/hovertest/behave.o:
(.gnu.linkonce.r._ZTV16htBehaviourActor+0x30): undefined reference to
`htBehaviourActor::QueryInterface(unsigned long, int)'
./out/linuxx86/optimize/apps/hovertest/behave.o:
(.gnu.linkonce.r._ZTV16htBehaviourActor+0x34): undefined reference to
`htBehaviourActor::AddRefOwner(iBase**)'
./out/linuxx86/optimize/apps/hovertest/behave.o:
(.gnu.linkonce.r._ZTV16htBehaviourActor+0x38): undefined reference to
`htBehaviourActor::RemoveRefOwner(iBase**)'
collect2: ld returned 1 exit status
g++ -o
hovertest ./out/linuxx86/optimize/apps/hovertest/htmain.o
./out/linuxx86/optimize/apps/hovertest/behave.o
./out/linuxx86/optimize/apps/hovertest/bl.o
./out/linuxx86/optimize/apps/hovertest/hovertest.o
./out/linuxx86/optimize/libs/libceltool.a
-L/home/genjix/media/programming/c++/game/cs/cs/CS/./out/linuxx86/optimize/libs
-lcrystalspace_python -lcrystalspace -lpthread -lz -L/usr/lib/python2.4
-L/usr/lib/python2.4/config -L/usr/lib -lpython2.4 -ldl -lutil -lm -lm -ldl
-lnsl -L/usr/local/lib
-L/home/genjix/media/programming/c++/game/cs/cs/CS/./out/linuxx86/optimize/libs
-lcrystalspace_python -lcrystalspace -lpthread -lz -L/usr/lib/python2.4
-L/usr/lib/python2.4/config -L/usr/lib -lpython2.4 -ldl -lutil -lm -lm -ldl
-lnsl -L/usr/local/lib
...failed LinkApplication hovertest ...
...failed updating 1 target(s)...
(attached files)
isn't immediately obvious what I've forgotten...
/*
Copyright (C) 2005 by Jorrit Tyberghein
This file is part of CEL.
CEL is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
CEL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with CEL; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "cssysdef.h"
#include "behave.h"
// CS Includes
#include "csutil/ref.h"
// CEL Includes
#include "propclass/mechsys.h"
#include "physicallayer/propclas.h"
htBehaviourActor::htBehaviourActor(iCelBlLayer* bl, iCelEntity* entity) : bl (bl), entity (entity)
{
SCF_CONSTRUCT_IBASE (0);
}
htBehaviourActor::~htBehaviourActor()
{
SCF_DESTRUCT_IBASE ();
}
bool htBehaviourActor::SendMessage (const char *msg_id, iCelPropertyClass *pc, celData &ret, iCelParameterBlock *params,...)
{
va_list arg;
va_start (arg, params);
bool rc = SendMessageV (msg_id, pc, ret, params, arg);
va_end (arg);
return rc;
}
bool htBehaviourActor::SendMessageV (const char *msg_id, iCelPropertyClass *pc, celData &ret, iCelParameterBlock *params, va_list arg)
{
bool pcinput_msg = strncmp (msg_id, "pccommandinput_", 15) == 0;
if (pcinput_msg)
{
csRef<iPcMechanicsObject> pcmechobj = CEL_QUERY_PROPCLASS_ENT (entity,
iPcMechanicsObject);
if (!pcmechobj)
return false;
if (!strcmp (msg_id+15, "forward1"))
pcmechobj->AddForceDuration (csVector3 (0, 0, -25.0f), false,
csVector3 (0, 0, 0), .2f);
else if (!strcmp (msg_id+15, "backward1"))
pcmechobj->AddForceDuration (csVector3 (0, 0, 25.0f), false,
csVector3 (0, 0, 0), .2f);
else if (!strcmp (msg_id+15, "strafeleft1"))
pcmechobj->AddForceDuration (csVector3 (25.0f, 0, 0), false,
csVector3 (0, 0, 0), .2f);
else if (!strcmp (msg_id+15, "straferight1"))
pcmechobj->AddForceDuration (csVector3 (-25.0f, 0, 0), false,
csVector3 (0, 0, 0), .2f);
else if (!strcmp (msg_id+15, "jump1"))
pcmechobj->AddForceDuration (csVector3 (0, 25.0f, 0), false,
csVector3 (0, 0, 0), .2f);
return true;
}
return false;
}
/*
Copyright (C) 2004 by Jorrit Tyberghein
This file is part of CEL.
CEL is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
CEL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with CEL; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __XD_BE_SHIP__
#define __XD_BE_SHIP__
// CS Includes
#include "csutil/weakref.h"
#include "csutil/scf.h"
// CEL Includes
#include "behaviourlayer/behave.h"
struct iCelBlLayer;
struct iCelEntity;
class htBehaviourActor : public iCelBehaviour
{
private:
iCelBlLayer* bl;
iCelEntity* entity;
public:
htBehaviourActor(iCelBlLayer *bl, iCelEntity *entity);
virtual ~htBehaviourActor();
SCF_DECLARE_IBASE;
virtual iCelBlLayer* GetBehaviourLayer () const { return bl; }
virtual void* GetInternalObject () { return 0; }
virtual const char* GetName () const { return "hoverobj"; }
virtual bool SendMessage (const char *msg_id, iCelPropertyClass *pc, celData &ret, iCelParameterBlock *params,...);
virtual bool SendMessageV (const char *msg_id, iCelPropertyClass *pc, celData &ret, iCelParameterBlock *params, va_list arg);
};
#endif