今天想将TCL脚本解释器集成到应用程序。遇到一个奇怪的问题。
问题代码如下:
在stdafx.h中包含了tcl.h文件。
编译时报如下错误:
1>------ Build started: Project: TCLStduio, Configuration: Debug Win32 ------
1> TCLStduioView.cpp
1>e:/my project/tclstduio/tclstduio/tclstduio.h(39): error C2143: syntax error : missing ';' before '*'
1>e:/my project/tclstduio/tclstduio/tclstduio.h(39): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:/my project/tclstduio/tclstduio/tclstduio.h(39): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
。。。。这里省略多条相同的错误提示
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
在tcl.h中TCL_Interp的相关定义如下:
做如下修改后问题解决。
struct TCL_Interp* m_TclInterp;
用的是VS2010,难道是C++标准不再支持typdef的这种用法??还是VS2010的Bug?