vlc\libvlc_structures.h(46) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_time_t”的前面)问题的解决方案
2017-03-23 10:59
651 查看
使用vlc的库进行编程,vs2008编译环境+win7操作系统,编译时提示:
1>d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_time_t”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(149) : error C2146: 语法错误 : 缺少“;”(在标识符“i_codec”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(149) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(149) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_get_duration”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C2086: “int libvlc_time_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : 参见“libvlc_time_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(412) : error C2061: 语法错误 : 标识符“uint32_t”
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_agl”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(436) : error C2061: 语法错误 : 标识符“uint32_t”
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_xwindow”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C2086: “int uint32_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : 参见“uint32_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_length”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C2086: “int libvlc_time_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : 参见“libvlc_time_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_time”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C2086: “int libvlc_time_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : 参见“libvlc_time_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(630) : error C2061: 语法错误 : 标识符“libvlc_time_t”
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(152) : error C2146: 语法错误 : 缺少“;”(在标识符“new_time”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(152) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(152) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(208) : error C2146: 语法错误 : 缺少“;”(在标识符“new_length”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(208) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(208) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
问题原因:
此问题是由于MS老的编译器造成的
解决方法:
在vlc.h头文件的最顶,增加定义
// Typedefs for old MS compilers
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
重新编译,问题解决
1>d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_time_t”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(149) : error C2146: 语法错误 : 缺少“;”(在标识符“i_codec”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(149) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(149) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_get_duration”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C2086: “int libvlc_time_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : 参见“libvlc_time_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media.h(419) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(412) : error C2061: 语法错误 : 标识符“uint32_t”
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_agl”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(436) : error C2061: 语法错误 : 标识符“uint32_t”
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_xwindow”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C2086: “int uint32_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(420) : 参见“uint32_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(447) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_length”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C2086: “int libvlc_time_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : 参见“libvlc_time_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(613) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C2146: 语法错误 : 缺少“;”(在标识符“libvlc_media_player_get_time”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C2086: “int libvlc_time_t”: 重定义
1> d:\test\testvlc\testvlc\vlc\libvlc_structures.h(46) : 参见“libvlc_time_t”的声明
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(621) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_media_player.h(630) : error C2061: 语法错误 : 标识符“libvlc_time_t”
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(152) : error C2146: 语法错误 : 缺少“;”(在标识符“new_time”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(152) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(152) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(208) : error C2146: 语法错误 : 缺少“;”(在标识符“new_length”的前面)
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(208) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\test\testvlc\testvlc\vlc\libvlc_events.h(208) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
问题原因:
此问题是由于MS老的编译器造成的
解决方法:
在vlc.h头文件的最顶,增加定义
// Typedefs for old MS compilers
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
重新编译,问题解决
相关文章推荐
- error C2146: 语法错误: 缺少“;”(在标识符“WINAPI”的前面) 及 “error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int” 解决方案
- cocos2d-x 在IDE vs2010 出现error C2146: 语法错误: 缺少“;”(在标识符“PVOID64”的前面)编译错误解决方案
- 解决vs error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)的问题
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误: 缺少“;”(在标识符“GetApplication”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- DX9.0 sdk开发中遇到的 winNT.h中错误error C2146: 语法错误: 缺少“;”(在标识符“PVOID64”的前面)
- C++ MySQL编译错误 error C2146: 语法错误 : 缺少“;”(在标识符“fd”的前面) 解决方法
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“RGB2Gray”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“hdr”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)[转]
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误: 缺少“)”(在标识符“,dtpSelected”的前面) 之中英文输入法的重要性
- error C2061: 语法错误 : 标识符“***” error C2146: 语法错误 : 缺少“;” C++两个类相互引用问题
- error C2146: 语法错误: 缺少“;”(在标识符“PVOID64”的前面)
- error C2146: 语法错误 : 缺少“;”(在标识符“PVOID64”的前面)[转]