QCTemplate已编译但无法链接
QCTemplate compiled but can't link
我下载了QCTemplate (http://code.google.com/p/qctemplate/)在CTemplate(0.95)提供的版本中有一个错误,所以更改
我编译了库,但当我尝试运行helloworld示例时,我得到5关于ctemplate::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 *)" (?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)
我怎样才能使它工作?
解决。我编译了QCtemplate的src,但不知何故没有template_cache。cc在Qt Creator中导入,它没有被编译。我手动添加它并再次编译,现在它可以工作了。
相关文章:
- 我可以将一个用clang c++11编译的对象与另一个用c++17编译的对象链接起来吗
- 生成一个生成文件,该生成文件使用Automake在一个步骤中编译和链接所有源文件
- Red Hat:使用<atomic>编译很好,但链接器找不到__atomic_store_16;什么库?
- 在发布模式下启动使用库的静态链接编译的应用程序时出错
- 编译时出错 - 链接.cpp和头文件
- 仅为从某种语言编译的对象添加链接库?
- C++ 为什么在定义的编译和链接之前引用外部实例的程序
- Visual Studio 2017 ARM 交叉编译链接器崩溃
- 在调试配置中编译工作正常,但发布会给出链接错误
- 可视化工作室项目中C++预编译标头未正确链接
- std::to_chars在MacOS/clang上编译但不链接
- 使用共享库编译可执行文件时仅链接所需的符号
- 编译时出现Boost.python链接错误
- 微控制器的首次 gcc 链接器脚本编译但不运行
- CUDA 和C++链接/编译,程序在 cudaMalloc 上崩溃
- 链接/编译时间有关静态模板库
- 链接/编译使用 boost/filesystem.hpp 的程序
- 我们可以动态链接编译的静态库吗?
- 如何在我的项目中使用CMake链接编译的cmph库
- 在msvc++ 2010中,在调试配置中用静态链接编译DLL时,链接器错误