undefined reference to `bool Script::get<bool>(char const*)'
Есть код(напиасан с использованием туториала https://eliasdaler.wordpress.com/2013/10/11/lua_cpp_binder/):
class Script{
public:
void create(const char *file);
void close();
void run();
template <typename T> T get(const char *var);
private:
template <typename T> T lua_get(const string& variableName);
template <typename T> T lua_get(const char *var){ return 0; }
bool lua_gettostack(const string& variableName);
lua_State *_L;
};
...
template <typename T> T EGE_Script::get(const char *var){
if(!_L) {
EGE_SetError("Script is not loaded");
return "null";
}
T _result;
if(lua_gettostack(string(var))){
_result = lua_get<T>(string(var));
} else {
_result = "null";
}
return _result;
}
...
bool happy = Script.get<bool>("happy");
Не знаю, что не так? Вот что говорит компилятор:
main.cpp:(.text+0x56): undefined reference to `bool Script::get<bool>(char const*)'