错误:L6218E:未定义的符号主(从__rtentry2.o简称) [英] Error: L6218E: Undefined symbol main (referred from __rtentry2.o)

查看:3271
本文介绍了错误:L6218E:未定义的符号主(从__rtentry2.o简称)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能帮助我吗?我的板是LPC1768和传感器BMP180

 重建目标目标1
编译BMP180.c ...
编译I2C.c ...
组装startup_LPC17xx.s ...
编译system_LPC17xx.c ...
编译GPIO_LPC17xx.c ...
编译PIN_LPC17xx.c ...
联...
\\对象\\ asdsa.axf:错误:L6218E:未定义符号主(从__rtentry2.o简称)。
没有足够的信息来列出图像符号。
表面处理:1的信息,警告0和1个错误消息。
\\对象\\ asdsa.axf - 1个错误,0警告(S)。
目标不是创造。


解决方案

我解决了这个问题,下面的步骤;


  1. 删除旧的项目并创建新的项目

  2. 选择从管理运行时环境,像这样真正的库:

  3. 配置为目标选项。定义符号 USE_STDPERIPH_DRIVER ,并定义像这样的项目路径:

  4. 测试您的配置。请写出下列code:

     的#includestm32f10x.h//设备头 诠释主(){
     }


anyone can help me?? my board is LPC1768 and the sensor is BMP180

Rebuild target 'Target 1'
compiling BMP180.c...
compiling I2C.c...
assembling startup_LPC17xx.s...
compiling system_LPC17xx.c...
compiling GPIO_LPC17xx.c...
compiling PIN_LPC17xx.c...
linking...
.\Objects\asdsa.axf: Error: L6218E: Undefined symbol main (referred from __rtentry2.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 1 error messages.
".\Objects\asdsa.axf" - 1 Error(s), 0 Warning(s).
Target not created.

解决方案

I solved this problem with the following steps;

  1. Delete your old project and create new project
  2. Choose true library from Manage Run Time Environment like so:
  3. Configure "Options for Target" segment. Define symbol USE_STDPERIPH_DRIVER and define project path like so:
  4. Test your configuration. Please write the following code:

     #include "stm32f10x.h"                  // Device header
    
     int main() {
     }
    

这篇关于错误:L6218E:未定义的符号主(从__rtentry2.o简称)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆