After adding the algorithm header:
Code:
Scanning dependencies of target Horde3D
[ 1%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egAnimation.o
/home/fnoeding/programming/horde3d/community_svn/Horde3D/Source/Horde3DEngine/egAnimation.cpp: In member function ‘virtual bool AnimationResource::load(const char*, int)’:
/home/fnoeding/programming/horde3d/community_svn/Horde3D/Source/Horde3DEngine/egAnimation.cpp:152: error: no matching function for call to ‘sort(__gnu_cxx::__normal_iterator<AnimResEntity*, std::vector<AnimResEntity, std::allocator<AnimResEntity> > >, __gnu_cxx::__normal_iterator<AnimResEntity*, std::vector<AnimResEntity, std::allocator<AnimResEntity> > >, AnimationResource::load(const char*, int)::CompFunc)’
make[2]: *** [Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egAnimation.o] Error 1
make[1]: *** [Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/all] Error 2
make: *** [all] Error 2
IIRC this is not standard C++ and depends on compiler defined behavior. If you make CompFunc a global struct it will work in g++ (as expected).