diff --git a/moses/LM/Ken.cpp b/moses/LM/Ken.cpp index e7267f66c..fd37ce45b 100644 --- a/moses/LM/Ken.cpp +++ b/moses/LM/Ken.cpp @@ -443,6 +443,20 @@ bool LanguageModelKen::IsUseable(const FactorMask &mask) const return ret; } + +/* Instantiate LanguageModelKen here. Tells the compiler to generate code + * for the instantiations' non-inline member functions in this file. + * Otherwise, depending on the compiler, those functions may not be present + * at link time. + */ +template class LanguageModelKen; +template class LanguageModelKen; +template class LanguageModelKen; +template class LanguageModelKen; +template class LanguageModelKen; +template class LanguageModelKen; + + LanguageModel *ConstructKenLM(const std::string &lineOrig) { FactorType factorType = 0;