BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #6643同步于 2008/5/12
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

求解:dev c++ 与visaul c++在编译时遇到的一个问题!

yutao071276
2008/5/12镜像同步3 回复
刚学C 语言 作业设计是个工程 在DEV 上做的确编译 运行是能正确通过! 但在VISAUL 上时 编译时只有一个警告 没有错误报告,但运行时有错无报告!如下: 编译时: --------------Configuration: - Win32 Debug-------------------- Compiling... main.c C:\Documents and Settings\N000\桌面\成品 - basic\main.c(22) : warning C4013: 'sleep' undefined; assuming extern returning int main.obj - 0 error(s), 1 warning(s) 运行时: --------------------Configuration: - Win32 Debug-------------------- Compiling... lift_status.c main.c C:\Documents and Settings\N000\桌面\成品 - basic\main.c(22) : warning C4013: 'sleep' undefined; assuming extern returning int pause.c C:\Documents and Settings\N000\桌面\成品 - basic\pause.c(8) : warning C4013: 'cartoon' undefined; assuming extern returning int C:\Documents and Settings\N000\桌面\成品 - basic\pause.c(10) : warning C4013: 'sleep' undefined; assuming extern returning int sortList.c C:\Documents and Settings\N000\桌面\成品 - basic\sortList.c(8) : error C2143: syntax error : missing ';' before 'type' C:\Documents and Settings\N000\桌面\成品 - basic\sortList.c(13) : error C2065: 'condition' : undeclared identifier C:\Documents and Settings\N000\桌面\成品 - basic\sortList.c(14) : error C2065: 'lift_floor' : undeclared identifier cartoon.c C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2275: 'rec' : illegal use of this type as an expression C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(8) : see declaration of 'rec' C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2146: syntax error : missing ';' before identifier 'r' C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2065: 'r' : undeclared identifier C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2059: syntax error : '{' C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(21) : error C2224: left of '.time' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(21) : error C2224: left of '.lift_floor' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(25) : error C2224: left of '.time' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(25) : error C2224: left of '.lift_floor' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(29) : error C2224: left of '.time' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(29) : error C2224: left of '.lift_floor' must have struct/union type clear.c control.c Error executing cl.exe. 13 error(s), 3 warning(s) 甚至有: Compiling... cartoon.c C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2275: 'rec' : illegal use of this type as an expression C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(8) : see declaration of 'rec' C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2146: syntax error : missing ';' before identifier 'r' C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2065: 'r' : undeclared identifier C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(18) : error C2059: syntax error : '{' C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(21) : error C2224: left of '.time' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(21) : error C2224: left of '.lift_floor' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(25) : error C2224: left of '.time' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(25) : error C2224: left of '.lift_floor' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(29) : error C2224: left of '.time' must have struct/union type C:\Documents and Settings\N000\桌面\成品 - basic\cartoon.c(29) : error C2224: left of '.lift_floor' must have struct/union type Error executing cl.exe. cartoon.obj - 10 error(s), 0 warning(s) Compiling... main.c C:\Documents and Settings\N000\桌面\成品 - basic\main.c(22) : warning C4013: 'sleep' undefined; assuming extern returning int main.obj - 0 error(s), 1 warning(s) 这样的报告! 小第不懂 求大哥们指点道路!
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
purevirtual机器人#1 · 2008/5/12
你注意看警告信息是undefined..... 【 在 yutao071276 (ΘЖá) 的大作中提到: 】 : 刚学C 语言 : 作业设计是个工程 : 在DEV 上做的确编译 运行是能正确通过! : ...................
ericyosho机器人#2 · 2008/5/12
感觉是time.h头文件没包含。
cussyou机器人#3 · 2008/5/13
sleep没定义 用Sleep吧