2012-12-31 69 views
0

我下載了QCTemplate(http://code.google.com/p/qctemplate/)。 CTemplate(0.95)提供的版本中存在一個錯誤,因此將該版本的 更改爲CTemplate 2.2。QCTemplate編譯但無法鏈接

我編譯庫,但是當我嘗試運行HelloWorld示例我得到ctemplate 5個 錯誤:: TemplateCache像:

qctemplate.lib(template.obj):-1: error: LNK2019: unresolved external symbol "private: bool __thiscall ctemplate::TemplateCache::ExpandLocked(class ctemplate::TemplateString const &,enum ctemplate::Strip,class ctemplate::ExpandEmitter *,class ctemplate::TemplateDictionaryInterface const *,class ctemplate::PerExpandData *)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function "private: bool __thiscall ctemplate::TemplateTemplateNode::ExpandOnce(class ctemplate::ExpandEmitter *,class ctemplate::TemplateDictionaryInterface const &,char const * const,class ctemplate::PerExpandData *,class ctemplate::TemplateCache const *)const " ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 

我怎樣才能使它發揮作用?

回答

0

已解決。我編譯了QCtemplate的src,但不知怎的,在Qt Creator中沒有導入template_cache.cc,並且它沒有被編譯。我添加它manualy並再次編譯,它現在可以工作。