Eclipse Arduino制作:***错误1

时间:2012-06-12 18:45:23

标签: eclipse gcc makefile arduino avr-gcc

以下是我尝试构建项目时出现的错误。我不确定它在说什么文件或目录。所有文件和目录都在项目目录中。

我按照http://arduino.cc/playground/Code/Eclipse中的说明设置了我的IDE。

Arduino核心文件是否应该在项目目录中并且专门添加到Arduino核心库中?我给它的全部是我的Arduino IDE生成的liArduinoCore.a文件。这可能是问题吗?

错误消息

**** Build of configuration Debug for project CustomLEDPoi ****

make all 
Building target: CustomLEDPoi.elf
Invoking: AVR C++ Linker
avr-gcc -Wl,-Map,CustomLEDPoi.map,--cref Wl,--gc-sections -    L"C:\Users\Justin\workspaceArduino\arduino_core\src" -L"C:\Users\Justin\workspaceArduino\arduino_core\328P_16MHz Arduino\src" -L"C:\Users\Justin\workspaceArduino\CustomLEDPoi\arduinolib" -L"C:\Users\Justin\workspaceArduino\CustomLEDPoi\lib" -mmcu=atmega328p -o "CustomLEDPoi.elf"  ./src/glowstick2.o  ./lib/CShiftPWM.o ./lib/MeetAndroid.o ./lib/hsv2rgb.o  ./arduinolib/HardwareSerial.o ./arduinolib/SPI.o   -lArduinoCore
avr-gcc.exe: Wl,--gc-sections: No such file or directory
make: *** [CustomLEDPoi.elf] Error 1

**** Build Finished ****

1 个答案:

答案 0 :(得分:3)

-似乎缺少Wl,--gc-sections。它应该是-Wl,--gc-sections。如果没有正确的标志,编译器会认为它是源文件。你应该检查makefile并验证。