views:

27

answers:

1

Hi,

I am using a shared library. Which I am using it to cross compile my executable. During the linking stage linker throws the error file format not recognised.

When I run ld on it libcclass.so: file not recognized: File format not recognized When I run file libcclass.so: it gives libcclass.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), not stripped

A: 

If you're cross-compiling an executable, you also need to cross-compile all of the shared libraries it depends on, and link against those. For example, you can't link an i386 executable to an x86_64 shared library.

caf