共2条
1/1 1 跳转至页
问
各位老师,中午好!
本人刚学C/C++,在笔记本电脑里装上VC++6.0,操作系统WINXP,PRO,SP2,输入TI的BSL(SLAA096)源代码做例程,编译时出现一大堆错误及警告,反复检查过源程序,输入不应该有错,
不知为何?
有人试过这个程序吗? 答 1: Build Log
--------------------Configuration: bsl - Win32 Debug--------------------
Command Lines
Creating temporary file "C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1C.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/bsl.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"E:\M_BUS\bslcomm.c"
"E:\M_BUS\bsldemo.c"
]
Creating command line "cl.exe C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1C.tmp"
Creating temporary file "C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1D.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/bsl.pdb" /debug /machine:I386 /out:"Debug/bsl.exe" /pdbtype:sept
.\Debug\bslcomm.obj
.\Debug\bsldemo.obj
]
Creating command line "link.exe C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1D.tmp"
Output Window
Compiling...
bslcomm.c
e:\m_bus\ssp.c(15) : error C2085: 'bslTxRx' : not in formal parameter list
e:\m_bus\ssp.c(15) : error C2143: syntax error : missing ';' before 'type'
e:\m_bus\ssp.c(15) : error C2085: 'protocolMode' : not in formal parameter list
e:\m_bus\ssp.c(15) : error C2143: syntax error : missing ';' before '='
e:\m_bus\ssp.c(94) : error C2065: 'hComPort' : undeclared identifier
e:\m_bus\ssp.c(94) : warning C4022: 'ClearCommError' : pointer mismatch for actual parameter 1
e:\m_bus\ssp.c(94) : error C2065: 'comState' : undeclared identifier
e:\m_bus\ssp.c(94) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct _COMSTAT *'
e:\m_bus\ssp.c(95) : error C2224: left of '.cbInQue' must have struct/union type
e:\m_bus\ssp.c(105) : warning C4022: 'ReadFile' : pointer mismatch for actual parameter 1
e:\m_bus\ssp.c(108) : error C2065: 'protocolMode' : undeclared identifier
e:\m_bus\ssp.c(109) : fatal error C1903: unable to recover from previous error(s); stopping compilation
bsldemo.c
e:\m_bus\bsldemo.c(30) : error C2085: 'bslTxRx' : not in formal parameter list
e:\m_bus\bsldemo.c(30) : error C2143: syntax error : missing ';' before 'PCH creation point'
e:\m_bus\bsldemo.c(49) : warning C4013: 'bslTxRx' undefined; assuming extern returning int
e:\m_bus\bsldemo.c(49) : error C2065: 'blkin' : undeclared identifier
e:\m_bus\bsldemo.c(62) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(62) : error C2065: 'blkout' : undeclared identifier
e:\m_bus\bsldemo.c(62) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(63) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(63) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(70) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(72) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(93) : warning C4013: 'verifyBlk' undefined; assuming extern returning int
e:\m_bus\bsldemo.c(177) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(177) : error C2102: '&' requires l-value
e:\m_bus\bsldemo.c(179) : error C2065: 'maxData' : undeclared identifier
e:\m_bus\bsldemo.c(201) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(201) : error C2106: '=' : left operand must be l-value
e:\m_bus\bsldemo.c(217) : error C2065: 'toDo' : undeclared identifier
e:\m_bus\bsldemo.c(217) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(242) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(263) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(264) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(265) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(266) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(267) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(268) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(269) : error C2224: left of '.OnePass' must have struct/union type
e:\m_bus\bsldemo.c(293) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(296) : error C2224: left of '.OnePass' must have struct/union type
e:\m_bus\bsldemo.c(307) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(308) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(309) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(310) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(311) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(312) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(320) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(324) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(328) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(332) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(336) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(340) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(368) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(413) : error C2224: left of '.OnePass' must have struct/union type
e:\m_bus\bsldemo.c(415) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(426) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(435) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(446) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(451) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(456) : error C2224: left of '.Verify' must have struct/union type
执行 cl.exe 时出错.
Results
bsl.exe - 1 error(s), 0 warning(s) 答 2: 这么多! 答 3: 这个程序已经有了 答 4: 先学学C,再来写程序
本人刚学C/C++,在笔记本电脑里装上VC++6.0,操作系统WINXP,PRO,SP2,输入TI的BSL(SLAA096)源代码做例程,编译时出现一大堆错误及警告,反复检查过源程序,输入不应该有错,
不知为何?
有人试过这个程序吗? 答 1: Build Log
--------------------Configuration: bsl - Win32 Debug--------------------
Command Lines
Creating temporary file "C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1C.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/bsl.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"E:\M_BUS\bslcomm.c"
"E:\M_BUS\bsldemo.c"
]
Creating command line "cl.exe C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1C.tmp"
Creating temporary file "C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1D.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/bsl.pdb" /debug /machine:I386 /out:"Debug/bsl.exe" /pdbtype:sept
.\Debug\bslcomm.obj
.\Debug\bsldemo.obj
]
Creating command line "link.exe C:\DOCUME~1\smwang\LOCALS~1\Temp\RSP1D.tmp"
Output Window
Compiling...
bslcomm.c
e:\m_bus\ssp.c(15) : error C2085: 'bslTxRx' : not in formal parameter list
e:\m_bus\ssp.c(15) : error C2143: syntax error : missing ';' before 'type'
e:\m_bus\ssp.c(15) : error C2085: 'protocolMode' : not in formal parameter list
e:\m_bus\ssp.c(15) : error C2143: syntax error : missing ';' before '='
e:\m_bus\ssp.c(94) : error C2065: 'hComPort' : undeclared identifier
e:\m_bus\ssp.c(94) : warning C4022: 'ClearCommError' : pointer mismatch for actual parameter 1
e:\m_bus\ssp.c(94) : error C2065: 'comState' : undeclared identifier
e:\m_bus\ssp.c(94) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct _COMSTAT *'
e:\m_bus\ssp.c(95) : error C2224: left of '.cbInQue' must have struct/union type
e:\m_bus\ssp.c(105) : warning C4022: 'ReadFile' : pointer mismatch for actual parameter 1
e:\m_bus\ssp.c(108) : error C2065: 'protocolMode' : undeclared identifier
e:\m_bus\ssp.c(109) : fatal error C1903: unable to recover from previous error(s); stopping compilation
bsldemo.c
e:\m_bus\bsldemo.c(30) : error C2085: 'bslTxRx' : not in formal parameter list
e:\m_bus\bsldemo.c(30) : error C2143: syntax error : missing ';' before 'PCH creation point'
e:\m_bus\bsldemo.c(49) : warning C4013: 'bslTxRx' undefined; assuming extern returning int
e:\m_bus\bsldemo.c(49) : error C2065: 'blkin' : undeclared identifier
e:\m_bus\bsldemo.c(62) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(62) : error C2065: 'blkout' : undeclared identifier
e:\m_bus\bsldemo.c(62) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(63) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(63) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(70) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(72) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(93) : warning C4013: 'verifyBlk' undefined; assuming extern returning int
e:\m_bus\bsldemo.c(177) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(177) : error C2102: '&' requires l-value
e:\m_bus\bsldemo.c(179) : error C2065: 'maxData' : undeclared identifier
e:\m_bus\bsldemo.c(201) : error C2109: subscript requires array or pointer type
e:\m_bus\bsldemo.c(201) : error C2106: '=' : left operand must be l-value
e:\m_bus\bsldemo.c(217) : error C2065: 'toDo' : undeclared identifier
e:\m_bus\bsldemo.c(217) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(242) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(263) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(264) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(265) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(266) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(267) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(268) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(269) : error C2224: left of '.OnePass' must have struct/union type
e:\m_bus\bsldemo.c(293) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(296) : error C2224: left of '.OnePass' must have struct/union type
e:\m_bus\bsldemo.c(307) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(308) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(309) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(310) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(311) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(312) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(320) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(324) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(328) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(332) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(336) : error C2224: left of '.Reset' must have struct/union type
e:\m_bus\bsldemo.c(340) : error C2224: left of '.Wait' must have struct/union type
e:\m_bus\bsldemo.c(368) : error C2224: left of '.MassErase' must have struct/union type
e:\m_bus\bsldemo.c(413) : error C2224: left of '.OnePass' must have struct/union type
e:\m_bus\bsldemo.c(415) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(426) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(435) : error C2224: left of '.Verify' must have struct/union type
e:\m_bus\bsldemo.c(446) : error C2224: left of '.EraseCheck' must have struct/union type
e:\m_bus\bsldemo.c(451) : error C2224: left of '.Program' must have struct/union type
e:\m_bus\bsldemo.c(456) : error C2224: left of '.Verify' must have struct/union type
执行 cl.exe 时出错.
Results
bsl.exe - 1 error(s), 0 warning(s) 答 2: 这么多! 答 3: 这个程序已经有了 答 4: 先学学C,再来写程序
共2条
1/1 1 跳转至页
回复
| 有奖活动 | |
|---|---|
| 这个春节你犒赏自己什么了?分享你的故事,有奖征集 | |
| 2026年“我要开发板活动”第三季,开始了! | |
| 硬核工程师专属补给计划——填盲盒 | |
| “我踩过的那些坑”主题活动——第002期 | |
| 【EEPW电子工程师创研计划】技术变现通道已开启~ | |
| 发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
| 【EEPW在线】E起听工程师的声音! | |
| 高校联络员开始招募啦!有惊喜!! | |
我要赚赏金打赏帖 |
|
|---|---|
| OK1126B-S开发板下函数构建及步进电机驱动控制被打赏¥25元 | |
| 【S32K3XX】LPI2C 参数配置说明被打赏¥20元 | |
| OK1126B-S开发板的脚本编程及应用设计被打赏¥27元 | |
| 5v升压8.4v两节锂电池充电芯片,针对同步和异步的IC测试被打赏¥35元 | |
| 【S32K3XX】S32DS LPI2C 配置失败问题解决被打赏¥22元 | |
| 【S32K3XX】FLASH 的 DID 保护机制被打赏¥19元 | |
| OK1126B-S开发板串口通信及其使用被打赏¥18元 | |
| 【S32K3XX】多核 CORE ID 获取被打赏¥18元 | |
| OK1126B-S开发板的GPIO资源及其使用被打赏¥20元 | |
| 【分享开发笔记,赚取电动螺丝刀】三分钟快速上手驱动屏幕(Arduino IDE环境)被打赏¥23元 | |
我要赚赏金
