关于TinyBind编译的问题!(急)

hyan 2010-04-05 11:48:51
最近一个项目想用TinyXML + TinyBind, 在编译TinyBind的例程时总提示:

\source\C++\tinybind\tinyxml\tinybind.h there are no arguments to `params' that depend on a template parameter, so a declaration of `params' must be available

不知有没有人用过,何解?
...全文
180 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
li2hplascu 2012-08-03
  • 打赏
  • 举报
回复
我在VS2008或者2010中编译,还会出现连接错误
error lnk2005:“char const * ——cdecl convertToString(double const &) already defined in Tinybind.obj”
这个问题处理呢?
hyan 2010-04-12
  • 打赏
  • 举报
回复
问题已解决,学到模板的一些规则,最后发现tinybind不太适合正在开发的项目,决定放弃之!

衷心感谢logiciel提供的帮助!
logiciel 2010-04-09
  • 打赏
  • 举报
回复
VC2005对此问题的报错信息是:
error C2768: illegal use of explicit template arguments.


ConvertFromString<char const *>( char const * strIn, const char * * dataOut )
改为
ConvertFromString( char const * strIn, const char * * dataOut )

在tinytest.cpp有类似问题,要把
GetTiXmlBinding<MyData>( MyData const &, Identity<MyData> )
改为
GetTiXmlBinding( MyData const &, Identity<MyData> )

修改后可在cygwin中编译、连接和运行。


hyan 2010-04-07
  • 打赏
  • 举报
回复
感谢logiciel!

现在解决了\source\C++\tinybind\tinyxml\tinybind.h there are no arguments to `params' that depend on a template parameter, so a declaration of `params' must be available
这个问题,但是又出现了一个新问题:
\tinybind.cpp template-id `ConvertFromString<const char*>' in declaration of primary template

怎么解决啊?
hyan 2010-04-07
  • 打赏
  • 举报
回复
感谢,问题出在需要显示指明 基类名称。现在又有一个新问题了:

tinybind\tinybind\tinybind.cpp template-id `ConvertFromString<const char*>' in declaration of primary template
logiciel 2010-04-06
  • 打赏
  • 举报
回复
用VC6.0编译、连接、运行都没有问题。

LZ所说的提示信息是在GCC下出现的吧,请参考以下信息:

http://http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/c---misunderstandings.html

11.9.2. Name lookup, templates, and accessing members of base classes

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧