繁体   English   中英

使用GNU C / C ++编译器在Eclipse中找不到库文件

[英]cannot not find library files in Eclipse with GNU C/C++ compiler

我有一个使用Eclipse + ARM Eclipse插件的项目( http://gnuarmeclipse.livius.net/blog/ ),我将路径设置为所需的库; 当我在Project Explorer中展开Includes节点时,我会看到这些库:

"${workspace_loc:/nrf51_sdk/nrf51822/Include/gcc}"
"${workspace_loc:/${ProjName}/include}"
"${workspace_loc:/nrf51_sdk/nrf51822/Include}"

缺少的库:“ nrf.h”

但是当我构建所有项目时,都会出现此错误:

make all 
Building file: /Development/EHAL-master/ARM/src/ResetEntry.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DNRF51 -std=gnu99 -MMD -MP -MF"src/ResetEntry.d" -MT"src/ResetEntry.o" -c -o "src/ResetEntry.o" "/Users/nullpointer/Development/EHAL-master/ARM/src/ResetEntry.c"
Finished building: /Development/EHAL-master/ARM/src/ResetEntry.c

Building file: ../src/system_nrf51.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -DNRF51 -std=gnu99 -MMD -MP -MF"src/system_nrf51.d" -MT"src/system_nrf51.o" -c -o "src/system_nrf51.o" "../src/system_nrf51.c"
../src/system_nrf51.c:36:17: fatal error: nrf.h: No such file or directory
 #include "nrf.h"
                 ^
compilation terminated.
make: *** [src/system_nrf51.o] Error 1

由于我在这种环境中还很陌生,所以我很失落。 谢谢

重新安装nRF51SDK后,通过项目的属性选项菜单-> C / C ++ Build->设置->跨ARM GNU汇编器-> Includes和C / C ++ Build->设置->,重新解决了库并再次将库链接到正确目录的问题。跨ARM C编译器->包括,并包括所有必需的库。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM