0

QCTemplate(http://code.google.com/p/qctemplate/)をダウンロードしました。CTemplate(0.95)で提供されているバージョンにバグがあったため、そのバージョンをCTemplate2.2に変更してください。

ライブラリをコンパイルしましたが、helloworldの例を実行しようとすると、ctemplate::TemplateCacheについて次のような5つのエラーが発生します。

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 *)" (?ExpandLocked@TemplateCache@ctemplate@@AAE_NABVTemplateString@2@W4Strip@2@PAVExpandEmitter@2@PBVTemplateDictionaryInterface@2@PAVPerExpandData@2@@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 " (?ExpandOnce@TemplateTemplateNode@ctemplate@@ABE_NPAVExpandEmitter@2@ABVTemplateDictionaryInterface@2@QBDPAVPerExpandData@2@PBVTemplateCache@2@@Z)

どうすればそれを機能させることができますか?

4

1 に答える 1

0

解決しました。QCtemplateのsrcをコンパイルしましたが、どういうわけかQt Creatorにtemplate_cache.ccがインポートされておらず、コンパイルされませんでした。手動で追加して再度コンパイルすると、動作するようになりました。

于 2012-12-31T10:45:46.880 に答える