keil μ5编译遇到的错误

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

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

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

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

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

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

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

        3...OBJTemplate.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语句变量重复使用

原文地址:https://www.cnblogs.com/deciduousmap/p/10683202.html