I have this makefile
libjackpot.a: jackport.o jackpot.o
ar -rcs jackport.o jackpot.o
jackpot.o: jackpot.cpp jackpot.h
g++ jackpot.cpp -std=c++11 -O2 -c
jackport.o: jackport.cpp jackpot.h jackport.h
g++ jackport.cpp -std=c++11 -O2 -c
Somehow (on my Linux box), I get
ar: jackport.o: File format not recognized
ar --help gives
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
file jackport.o
jackport.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
Because the system cannot find the file, it responded with the "format not recognized" messaged. The solution: Provide the full path name withen identifying the file during the upload process. Ensure your document is a PDF document.
Description. The ar (archive) file format combines several files into one. The ar command creates an archive file. The ld (link editor) command searches archive files to resolve program linkage.
You need to specify the library name for ar, e.g.:
ar -rcs libjackpot.a jackport.o jackpot.o
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With