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:
- Just to check: usually you would add
flags toCFLAGS
rather thanCTAGS
- are you sure this is
correct? (What you have may be correct - this will depend on your build system!) - 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
Linking Problems Due to Symbols with Abi::Cxx11
Decltype as a Return Type in Class Member Function
Does the Behavior of Guaranteed Copy Elision Depend on Existence of User-Defined Copy Constructor
Using Vector<Char> as a Buffer Without Initializing It on Resize()
How Does Switch Compile in Visual C++ and How Optimized and Fast Is It
Undefined Behaviour Somewhere in Boost::Spirit::Qi::Phrase_Parse
Constexpr Not Compiling in Vc2013
Converting Epoch Time to "Real" Date/Time
Cross Platform Floating Point Consistency
Why Can't "Transform(S.Begin(),S.End(),S.Begin(),Tolower)" Be Complied Successfully
Expansion with Variadic Templates
How to Make Std::Make_Unique a Friend of My Class
How Does a 32 Bit Processor Support 64 Bit Integers
How to Call the Original "Operator New" If I Have Overloaded It