bone animations

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
AcidFaucet
Posts: 7
Joined: Sun Oct 16, 2005 1:37 am

Post by AcidFaucet »

visual studio 2003, flips out like mad when you try to compile Irrlicht with the changes. Vanilla Irrlicht compiles fine, but the minute I copy and paste the changed files into irrlicht, wham!

Irrlicht error LNK2001: unresolved external symbol "public: virtual void __thiscall irr::scene::IAnimatedMeshX::getBones(class irr::core::array<class irr::core::matrix4> *)" (?getBones@IAnimatedMeshX@scene@irr@@UAEXPAV?$array@Vmatrix4@core@irr@@@core@3@@Z)

Irrlicht error LNK2001: unresolved external symbol "public: virtual void __thiscall irr::scene::IAnimatedMeshX::useCMeshBones(class irr::core::array<class irr::core::matrix4> *,bool)" (?useCMeshBones@IAnimatedMeshX@scene@irr@@UAEXPAV?$array@Vmatrix4@core@irr@@@core@3@_N@Z)

An error I've never seen in my life. Currently going through MSDN to find a way around it, or what I might have done wrong.
AcidFaucet
Posts: 7
Joined: Sun Oct 16, 2005 1:37 am

Post by AcidFaucet »

refuses to compile in VC++ 6.0 also, but compiles in Dev-C++. So, in short, looks like I'm just gonna have to do it myself because DevC++ is evil and I refuse to use it, even if it does work sometimes.
AcidFaucet
Posts: 7
Joined: Sun Oct 16, 2005 1:37 am

Post by AcidFaucet »

well, if this helps anyone, I solved (at least for me) the problem with the code in C++. The only change that needs to be made is:

In the modified headers, the class permission labels juggle where there's modifications. For example:

Public:
insert code here
Private:
insert code here
Public:
insert code here

VC2003 seems to freak out about this, which does make sense to me. By rearranging things into their proper groupings instead of divided amongst 2 or 3 sets of public and private the code worked. In short, seems to just be a problem where one compiler allows you to get away with something weird, and another doesn't. Unless I'm totally wrong and changed other stuff without even being aware of it.
TheNightmare
Posts: 1
Joined: Sat Oct 22, 2005 5:37 am

Post by TheNightmare »

On my system(suse 10 + gcc 4) Irrlicht compiles fine with the mods but when i try to compile the samples i receive link errors

Code: Select all

g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
../../lib/Linux/libIrrlicht.a(CXAnimationPlayer.o):(.gnu.linkonce.r._ZTIN3irr5scene17CXAnimationPlayerE[typeinfo for irr::scene::CXAnimationPlayer]+0x8): undefined reference to `typeinfo for irr::scene::IAnimatedMeshX'
../../lib/Linux/libIrrlicht.a(CXAnimationPlayer.o): In function `irr::scene::IAnimatedMeshX::IAnimatedMeshX()':
CXAnimationPlayer.cpp:(.gnu.linkonce.t._ZN3irr5scene14IAnimatedMeshXC2Ev[irr::scene::IAnimatedMeshX::IAnimatedMeshX()]+0x16): undefined reference to `vtable for irr::scene::IAnimatedMeshX'
../../lib/Linux/libIrrlicht.a(CXAnimationPlayer.o): In function `irr::scene::IAnimatedMeshX::~IAnimatedMeshX()':
CXAnimationPlayer.cpp:(.gnu.linkonce.t._ZN3irr5scene14IAnimatedMeshXD2Ev[irr::scene::IAnimatedMeshX::~IAnimatedMeshX()]+0x7): undefined reference to `vtable for irr::scene::IAnimatedMeshX'
collect2: ld returned 1 exit status
make: *** [all] Error 1
This also hapens with every app which uses .X animations
Mike
Posts: 17
Joined: Wed Dec 14, 2005 6:42 pm

Post by Mike »

If you can't compile in VC change this code in IAnimatedMesh.h:

Code: Select all

// new 1 -------------------------------------------------
		virtual void useCMeshBones(core::array<core::matrix4>* lstBones, bool use) = 0;
		virtual void getBones(core::array<core::matrix4>* lstBones) = 0;
// -------------------------------------------------------
Those weren't pure virtual functions.
Post Reply