簡體   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