您能帮我解决以下TouchGFX错误吗?我想使用移动动画器移动EnteredTextArea框,但CustomKeybaord.cpp:LNK2019无法解析的外部符号中出现错误。但是,我似乎无法解决该错误。
确切的错误是::
LNK2019 unresolved external symbol "public: void __thiscall touchgfx::Keyboard::setMove(short,short,unsigned short)" (?setMove@Keyboard@touchgfx@@QAEXFFG@Z) referenced in function "public: void __thiscall CustomKeyboard::setTextMove(short,short,unsigned short)" (?setTextMove@CustomKeyboard@@QAEXFFG@Z) Application C:\TouchGFXProjects\MyApplication\simulator\msvs\CustomKeyboard.obj 1 Link
KEYBOARD.HPP
#ifndef KEYBOARD_HPP
#define KEYBOARD_HPP
#include <touchgfx/mixins/MoveAnimator.hpp>
namespace touchgfx
{class Keyboard : public Container
{
public:
void setMove(int16_t endX, int16_t endY, uint16_t duration);
protected:
touchgfx::MoveAnimator < TextAreaWithOneWildcard > enteredText;
};
} // namespace touchgfx
#endif // KEYBOARD_HPP
KEYBOARD.CPP
#include <touchgfx/widgets/Keyboard.hpp>
namespace touchgfx
{
void Keyboard::setMove(int16_t endX, int16_t endY, uint16_t duration)
{
enteredText.startMoveAnimation(endX, endY, duration);
}
} // namespace touchgfx
CustomKeyboard.hpp
#ifndef TGFXKEYBOARD_HPP_
#define TGFXKEYBOARD_HPP_
#include <touchgfx/widgets/Keyboard.hpp>
using namespace touchgfx;
class CustomKeyboard : public Container
{
public:
void setTextMove(int16_t endX, int16_t endY, uint16_t duration);
private:
};
CustomKeyboard.cpp
void CustomKeyboard::setTextMove(int16_t endX, int16_t endY, uint16_t duration) {
keyboard.setMove(endX, endY, duration);
}
在我的screenView中是通话:
keyboard.setTextMove(2,3,1);