[AVR单片机] ICCAVR7.22不认我的putchar()函数?

[复制链接]
 楼主| TECHWELL 发表于 2013-9-6 17:21 | 显示全部楼层 |阅读模式
本帖最后由 TECHWELL 于 2013-9-6 17:32 编辑

  N年前,我在WINDOWS XP下,用ICCAVR 6.31A做了一些工程。如今,用上了WIN7,
在WIN7之下,ICCAVR6.31是死活不能运行的. 只好改用ICCAVR 7.22,编译时就有了问题:
ICCAVR 7.22 不认我自己编写的int putchar(char c)函数.我已经在各C文件中#include "stdio.h".
ICCAVR 7.22报错如下:
!ERROR Function 'putchar' not defined. This is a hardware dependent function,
  and it is not included in the ICCAVR default library. Please implement
  this function to match your target requirements. You can find examples
  of this function under the <install root>\examples.AVR directory. Make
  a copy of a suitable example, add it to your project and modify it if
  needed. The source code must #include the appropriate C header file
  (e.g. stdio.h) as it contains the special compiler pragma for 'putchar'.
上边一大堆,意思就是ICCAVR7.22在连接时,找不到putchar()这个函数。
  
  
  ICCAVR7.22 的 stdio.h中的putchar()函数,是这样;
  int putchar(char);
  
  我的工程中,XX.c文件中的putchar()函数也是这样的(大小写也是一致的):
  int putchar(char c)  
   {
     ...
    return ...
   }

  这一切,显然都是对的,它为何就不认我的putchar()函数呢?
  
  
huangxz 发表于 2013-9-7 15:17 | 显示全部楼层
没问题啊

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×

评分

参与人数 1威望 +6 收起 理由
qin552011373 + 6 很给力!

查看全部评分

qin552011373 发表于 2013-9-7 23:57 | 显示全部楼层
上传一下你的工程看看
您需要登录后才可以回帖 登录 | 注册

本版积分规则

24

主题

78

帖子

6

粉丝
快速回复 在线客服 返回列表 返回顶部

24

主题

78

帖子

6

粉丝
快速回复 在线客服 返回列表 返回顶部