This repository was archived by the owner on Sep 2, 2018. It is now read-only.
This repository was archived by the owner on Sep 2, 2018. It is now read-only.
Archive index issue #165
Closed
Description
- I've compiled few files into .o like this:
./clang -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include --target=avr /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/WString.cpp -o /tmp/arduino_test1/WString.cpp.o
- created archive:
./llvm-ar rcs /tmp/arduino_test1/core.a /tmp/arduino_test1/WString.cpp.o
- link like this:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections,--relax -mmcu=atmega328p -o /tmp/arduino_test1/Blink.cpp.elf /tmp/arduino_test1/Blink.cpp.o /tmp/arduino_test1/core.a -L/tmp/arduino_test1 -lm
I've got an error:
/tmp/arduino_test1/core.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
Should i need system linker or avr's clang from compiled binaries? i believe i've read linker is not provided and it will use system linker anyway. Is it correct?
- Add index to archive:
./llvm-ranlib /tmp/arduino_test1/core.a
- try to link again and still get the same error as in 3)
Metadata
Metadata
Assignees
Labels
No labels