错题本
Strange_Head
嵌入式Linux
展开
-
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o: In function `_start‘: (.text+0x2
今天在linux中写一个测试代码,gcc忽然报错如下信息上述提示翻译。原创 2022-12-22 16:27:58 · 834 阅读 · 0 评论 -
error: ‘theachar‘ undeclared (first use in this function); did you mean ‘theacher‘?
在c语言编程当中遇到error: ‘theachar’ undeclared (first use in this function); did you mean ‘theacher’?问题看如下代码:这里可以看到,上面定义了一个teacher变量,下面却用了一个techer未定义的一个变量,这明显是错误的,但大型程序当中密密麻麻的很容易遗漏此问题,所已为了演示可以假装没看出来一般报错最好方法,上有道翻译查找(程序员之宝典)说“teachar未声明”,这已经很明显了在结合报错的行号(23)可以知道,原创 2022-12-05 15:03:39 · 2958 阅读 · 0 评论 -
error: conflicting types for ‘display’ snake.c:11:6: note: previous declaration of ‘display’ was he
error: conflicting types for ‘display’snake.c:11:6: note: previous declaration of ‘display’ was here原创 2022-12-09 20:40:30 · 415 阅读 · 0 评论 -
Linux错题本之curses导入问题undefined reference to `initscr‘
undefined reference to `initscr'原创 2022-12-07 22:04:52 · 340 阅读 · 0 评论 -
warning: initialization makes pointer from integer without a cast [enabled by default]
这种警告通常是由于在初始化一个指针时将一个整型值直接赋值给指针导致的。在C语言中,指针和整型是不同类型,不能直接相互赋值。最好的方法是将整型转换为指针类型,或者检查代码是否有错误。使用强制类型转换,将整型转换为指针类型。原创 2023-01-19 15:04:39 · 7721 阅读 · 0 评论