C++奇怪的问题。 有关typedef 结构体。

今天想将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?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值