我在动态库中有一个带有公共函数的类:
void setActiveAnimation(std::shared_ptr<MaJR::Animation> anim);
当我尝试这样称呼它时:
MaJR::Actor actor;
actor.setActiveAnimation(idleAnimation);
我得到以下信息:
/home/mike/NixCraft/main.cpp||In function 'int main()':|
/home/mike/NixCraft/main.cpp|12|error: no matching function for call to 'MaJR::Actor::setActiveAnimation(MaJR::Animation&)'|
/home/mike/NixCraft/main.cpp|12|note: candidate is:|
/usr/include/MaJR/Actor.hpp|16|note: void MaJR::Actor::setActiveAnimation(std::shared_ptr<MaJR::Animation>)|
/usr/include/MaJR/Actor.hpp|16|note: no known conversion for argument 1 from 'MaJR::Animation' to 'std::shared_ptr<MaJR::Animation>'|
||=== Build finished: 4 errors, 0 warnings ===|
我应该怎么办?