使用tcl 8.4程序的编译

在编译SME-3.2.73的时候,遇到了Tcl_CreateCommand程序调用编译错误,后来在网络上google才知道这是tcl升级到8.4的问题。

invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’

后来在http://wiki.tcl.tk/3669找到了答案。
解决办法:
1 可以在g++编译的时候加上-DUSE_NON_CONST参数
2 可以在代码中引入tcl.h之前定义此宏。

#define USE_NON_CONST
#include “tcl.h”

This entry was posted in Linux and tagged , , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string BjSe10 to the field below:

以新浪微博帐号登录