This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Error in linking


> When I try to compile and link a program in HP-UX 11 using g++, I
obtain
> the following error when trying to link with a previously compiled
> library:

> "Not a valid library (invalid magic number). Possibly a 64-bit PA
> archive library (Mismatched ABI)"

Which library are You linking?
What program do You compile?
Could You give a small example and provide the output of gcc -v?
Did You build gcc yourself?

> The same library works fine when I'm compiling and linking using gcc
> instead of g++.

Maybe You should ensure the headers of this
library are included as extern "C"

extern "C" {
#include "libheader"
}

That may already remove the problem


Markus





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]