[开发工具] mplab ide一直编译build faild

[复制链接]
 楼主| 2451668397 发表于 2019-4-11 11:20 | 显示全部楼层 |阅读模式
Debug build of project `C:\huijingziliao\shiyanlicheng\HL-K18 18F4520 V8.0\1 LED1X1\k18.mcp' started.
Language tool versions: MPASMWIN.exe v5.35, mplink.exe v4.35, mcc18.exe v3.35
Preprocessor symbol `__DEBUG' is defined.
Thu Apr 11 11:07:37 2019
----------------------------------------------------------------------
Make: The target "C:\huijingziliao\shiyanlicheng\HL-K18 18F4520 V8.0\1 LED1X1\k18.o" is out of date.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4520 /i"C:\MCC18\h" "k18.c" -fo="k18.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Make: The target "C:\huijingziliao\shiyanlicheng\HL-K18 18F4520 V8.0\1 LED1X1\main.o" is out of date.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4520 /i"C:\MCC18\h" "main.c" -fo="main.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Make: The target "C:\huijingziliao\shiyanlicheng\HL-K18 18F4520 V8.0\1 LED1X1\delay.o" is out of date.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4520 /i"C:\MCC18\h" "delay.c" -fo="delay.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Make: The target "C:\huijingziliao\shiyanlicheng\HL-K18 18F4520 V8.0\1 LED1X1\k18.cof" is out of date.
Executing: "C:\MCC18\bin\mplink.exe" /l"C:\MCC18\lib" "..\..\..\..\MCC18\lkr\18f4520.lkr" "k18.o" "main.o" "delay.o" /u_CRUNTIME /u_DEBUG /m"k18.map" /w /o"k18.cof"
MPLINK 4.00, Linker
Copyright (c) 2005 Microchip Technology Inc.
Error - unknown switch: /u_CRUNTIME
Errors    : 1

Link step failed.
----------------------------------------------------------------------
Debug build of project `C:\huijingziliao\shiyanlicheng\HL-K18 18F4520 V8.0\1 LED1X1\k18.mcp' failed.
Language tool versions: MPASMWIN.exe v5.35, mplink.exe v4.35, mcc18.exe v3.35
Preprocessor symbol `__DEBUG' is defined.
Thu Apr 11 11:07:40 2019
----------------------------------------------------------------------
BUILD FAILED

评论

有没有大神解释下刚入行被这个困扰两天了,做什么都编译失败  发表于 2019-4-11 11:24
systemchip 发表于 2019-4-12 10:56 | 显示全部楼层
代码里有条件编译设置吧?感觉是设置错误
 楼主| 2451668397 发表于 2019-4-12 14:18 | 显示全部楼层
systemchip 发表于 2019-4-12 10:56
代码里有条件编译设置吧?感觉是设置错误

代码应该是没有问题的吧,是接着别人的开发板学习的。里面的例程应该是通过实验的。我是新手照着操作打开例程来实验,总是编译出现这个错误,不止这一个程序,感觉应该是代码外的问题
#include <p18cxxx.h>
#include "k18.h"
#include "Delay.h"
void main(void)
{
unsigned char a = 0x01;
unsigned char  b;

k18_init();/*HL-K18主板初始化*/

TRISD=0X00;/*设置D口为输出*/

COL1=1;/*选通点阵管的第一列的LED,点阵管的第一列的LED作为显示LED*/

while(1)
        {
        PORTD=00000001;
        /*点阵管亮或灭*/
        }
}
Cjy_JDxy 发表于 2019-4-12 16:59 | 显示全部楼层
是不是编译路径没设置好
Rock007 发表于 2019-4-15 13:32 | 显示全部楼层
换个编译器试试。
wooda 发表于 2019-4-15 14:43 | 显示全部楼层
Error - unknown switch: /u_CRUNTIME
估计你换过编译器了
condition 发表于 2019-4-15 21:16 | 显示全部楼层
编译环境没有配置好
幸福小强 发表于 2019-4-15 23:25 | 显示全部楼层
工程没有配置对。
21mengnan 发表于 2019-4-16 12:00 | 显示全部楼层
调试出来了吗
yiy 发表于 2019-4-16 22:06 | 显示全部楼层
弄好了没。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

3

帖子

0

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