这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 基础知识 » BSL BSL编程求助!

共2条 1/1 1 跳转至

BSL BSL编程求助!

院士
2006-09-17 18:14:16     打赏
BSL BSL编程求助!



关键词: 编程     求助    

院士
2006-12-22 22:43:00     打赏
2楼
问 各位老师,中午好!
本人刚学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 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]