keil μ5编译遇到的错误

1...\OBJ\Template.axf: Error: L6200E: Symbol f multiply defined (by outputlayer.o and inputlayer.o).

原因----多个文件编译同一个函数

解决方法:限定编译次数。

-----三种情况: 1.文件内重定义

       -----使用#pragma once 或者#ifndef 文件名 #define 文件名  #endif 即可解决

         2.多个文件在链接时出错-----

        本例f函数在被多个文件编译謀 消除重叠。

        3...\OBJ\Template.axf: Error: L6200E: Symbol DataScope_OutPut_Buffer multiply defined (by transfer.o and datascope_dp.o).

        原因:错误地引入#include "DataScope_DP.c"文件导致多次编译。

        解决方法:引入正确的包文件#include "DataScope_DP.h"

2.程序编译无错、烧录进去没有预期响应

    ------可能:for语句变量重复使用

posted @ 2019-04-10 14:36  秋风不识春  阅读(1588)  评论(0编辑  收藏  举报