I am working on Ubuntu and I have created a static c library following the instructions of this site .
But the resulting .a package only works on the machine where it was compiled.
I know that the .a archive contains object files (only one in my case), so I can pack together object files compiled on different machines (i386 and amd64) so ββthat GCC can know which file should use
If I canβt, can at least make my library recognizable by other similar machines? (using -L. -llibraryname)
Example:
archive name "libvisualt64.a"
: gcc -o main main.c -L. -lvisualt64
He speaks:
skipping incompatible ./libvisualt.a when searching for -lvisualt64
cannot find -lvisualt64
error: ld returned 1 exit status
In this case, I collected the source and built the archive on the same 64-bit machine only yesterday. And yesterday everything went fine. This also happens on 32-bit machines.
source
share