My Problem: I have a custom library which i need to compile my programm. However the linker does not accept the library as compatible, skips over it and thus fails. Other questions try to link a 32bit and 64bit architecture/library (or vice versa). My library and machine architecture however are both 64bit. The library contains several object files which all have the same file format which i returned with:
objdump -f libmylib.Linux64.a
In archive libmylib.Linux64.a:
obj1.o: file format elf64-little
architecture: UNKNOWN!, flags: 0x00000011
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
obj2.o: file format elf64-little
architecture: UNKNOWN!, flags: 0x00000011
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
[...]
My guess is the problem originates from the unkown architecture and different file-format, apparently being not compatible with my main.cpp.o files.
My Question:
is it possible to convert the library to the file format:
elf64-littleaarch64
and set the architecture to
aarch64
(that is the format of my main.cpp.o)? If so how would i do that? I tried extracting the object files and rebuilding the library with
ar -qc --target=elf64-littleaarch64
without any success.
Or do i have to set the proper flags in my CMakeList.txt and if so what are they?
Thanks in advance, any pointing in the right direction or help would be really appreciated
User contributions licensed under CC BY-SA 3.0