BG4RFF 发表于 2019-12-6 15:04:58

求助EWSTM8编译通过链接出问题

Error: no definition for "__write"


这个unity测试框架里的
#ifndef UNITY_OUTPUT_CHAR
/* Default to using putchar, which is defined in stdio.h */
#include <stdio.h>
#define UNITY_OUTPUT_CHAR(a)(void)putchar(a)
#else
/* If defined as something else, make sure we declare it here so it's ready for use */
#ifdef UNITY_OUTPUT_CHAR_HEADER_DECLARATION
    extern void UNITY_OUTPUT_CHAR_HEADER_DECLARATION;
#endif
#endif


但是我不加载框架,直接调用putchar没有问题的,加载框架后编译通过,链接出问题了
请老师同学们指点一下

mikecai 发表于 2019-12-7 09:40:21

是不是设加上编译链接的库文件 dlstm8mln.a啊?
添加库文件方法,可自己百度下

BG4RFF 发表于 2019-12-9 08:54:25

谢谢楼上回复
printf选FULL,然后link时选中C-SPY就可以了,但不明道理
页: [1]
查看完整版本: 求助EWSTM8编译通过链接出问题