Skipping Incompatible Libraries at Compile

Skipping Incompatible Libraries at compile

That message isn't actually an error - it's just a warning that the file in question isn't of the right architecture (e.g. 32-bit vs 64-bit, wrong CPU architecture). The linker will keep looking for a library of the right type.

Of course, if you're also getting an error along the lines of can't find lPI-Http then you have a problem :-)

It's hard to suggest what the exact remedy will be without knowing the details of your build system and makefiles, but here are a couple of shots in the dark:

  1. Just to check: usually you would add
    flags to CFLAGS rather than
    CTAGS - are you sure this is
    correct? (What you have may be correct - this will depend on your build system!)
  2. Often the flag needs to be passed to the linker too - so you may also need to modify LDFLAGS

If that doesn't help - can you post the full error output, plus the actual command (e.g. gcc foo.c -m32 -Dxxx etc) that was being executed?

Skipping incompatible directory - gcc

The library /home/yuki/sac/lib/libsacio.a was built for an architecture
incompatible with the one for which you are attempting to link the program.
The likeliest cause is that the library contains 32-bit object files and
you are attempting a 64-bit linkage. The next likeliest is a 64-bit library
in a 32-bit linkage.

If you cd to the directory where you ran this linkage and run:

$ objdump -f sac2mt5.o

the output will contain lines of the form:

sac2mt5.o:  file format <...>
architecture: <...>, flags 0x<...>:

e.g. (64-bit ELF):

sac2mt5.o:     file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000010:

or (32-bit ELF):

sac2mt5.o:     file format elf32-i386
architecture: i386, flags 0x00000010:

These tell you the name of the architecture you trying to link for (the
architecture of your system) and the name of its object file format.

If you then also run:

$ objdump -f /home/yuki/sac/lib/libsacio.a

you will see the corresponding information for each object file in the
archive /home/yuki/sac/lib/libsacio.a, and you will see that the architecture
and file format of those object files does not match your system.

You need to find and use a libsacio.a that was built for the same architecture
as your system - most likely a 64-bit library if your system is 64-bit; a 32-bit
library if your system is 32-bit.

skipping incompatible... / cannot find

That's an indication that you're building a 64-bit binary and the libraries are for a 32-bit target (or vice versa).

Getting error (skipping incompatible) while trying to build OpenGl project, despite library (glew32.a) seems to be fine

Well, I solved this problem pretty simple - just used pre build .lib file and defined GLEW_STATIC at the beginning



Related Topics



Leave a reply



Submit