afxstat_.h(164) : error C2143 syntax error : missing ';' before '*'报错的解决

本文详细介绍了在将TCPMP从EVC4.0移植到VS2005时遇到的CECOM错误,并提供了有效的解决方法。包括修改特定包含文件的代码来解决编译问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近把TCPMP从EVC4.0移植到VS2005时在文件CEQID3Info.cpp的编译时总是出现以下的错误:

1>------ 已启动生成: 项目: VideoPlayer, 配置: Debug CE2443I (ARMV4I) ------
1>正在编译...
1>CGetID3Info.cpp
1>_CE_ACTIVEX was not defined because this Windows CE SDK does not have DCOM.
1> _CE_ACTIVEX could be caused to be defined by defining _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that this be done only for single-threaded apps.
1>_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxstat_.h(164) : error C2143: syntax error : missing ';' before '*'
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxstat_.h(164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxstat_.h(164) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxstat_.h(205) : error C2504: 'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>' : base class undefined
1>        with
1>        [
1>            KEY=void *,
1>            ARG_KEY=void *,
1>            VALUE=void *,
1>            ARG_VALUE=void *
1>        ]
1>生成日志保存在“file://e:\Au1380_forVolo\Software_Design\R&D Projects\SourceCode\VideoPlayer\VideoPlayerAdapter\CE2443I (ARMV4I)\Debug\BuildLog.htm”
1>VideoPlayer - 4 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========

解决方法:

#ifndef _VO_SDK_VERSION_
#include <AFXtempl.h>
#endif

 

改为

 

#ifndef _VO_SDK_VERSION_
// #include <afxwin.h>
// #include <afx.h>
#include <AFXtempl.h>
#endif
 

 

参考 资料:

点击打开链接

Error using loadlibrary Building ueye_thunk_pcwin64 failed. Compiler output is: cl -I"C:\Program Files\MATLAB\R2024b\extern\include" /Zc:__cplusplus /Zp8 /W3 /nologo -I"C:\Users\bio\Desktop\Zhenyu" -I"C:\Program Files\IDS\uEye\develop\include" "ueye_thunk_pcwin64.c" -LD -Fe"ueye_thunk_pcwin64.dll" ueye_thunk_pcwin64.c ueye_thunk_pcwin64.c(567): error C2059: syntax error: ')' ueye_thunk_pcwin64.c(567): error C2061: syntax error: identifier 'INT__cdeclis_ExitImageQueue' ueye_thunk_pcwin64.c(567): error C2059: syntax error: ';' ueye_thunk_pcwin64.c(568): error C2143: syntax error: missing ')' before '{' ueye_thunk_pcwin64.c(569): error C2059: syntax error: ')' ueye_thunk_pcwin64.c(569): error C2065: 'deprecated': undeclared identifier ueye_thunk_pcwin64.c(569): error C2146: syntax error: missing ';' before identifier 'INT' ueye_thunk_pcwin64.c(569): error C2275: 'INT': expected an expression instead of a type ueye_thunk_pcwin64.c(569): error C2143: syntax error: missing ';' before '__cdecl' ueye_thunk_pcwin64.c(570): error C2065: 'p0': undeclared identifier ueye_thunk_pcwin64.c(570): error C2065: 'deprecated': undeclared identifier ueye_thunk_pcwin64.c(570): error C2100: you cannot dereference an operand of type 'int' ueye_thunk_pcwin64.c(570): error C2146: syntax error: missing ';' before identifier 'INT' ueye_thunk_pcwin64.c(570): error C2275: 'INT': expected an expression instead of a type ueye_thunk_pcwin64.c(570): error C2143: syntax error: missing ';' before '__cdecl' ueye_thunk_pcwin64.c(571): error C2065: 'p0': undeclared identifier ueye_thunk_pcwin64.c(571): error C2065: 'p0': undeclared identifier ueye_thunk_pcwin64.c(571): error C2065: 'p0': undeclared identifier ueye_thunk_pcwin64.c(572): error C2059: syntax error: ')' Error in control (line 9) loadlibrary(dllPath, headerPath, 'alias', 'ueye'); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>
最新发布
07-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值