help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is a gnu object file like an other compiler object file


From: Paul Pluzhnikov
Subject: Re: Is a gnu object file like an other compiler object file
Date: Fri, 09 Dec 2005 08:38:38 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Giulio Guarnone <genghis.khan@tiscali.it> writes:

> I've a static library (not open source) implementing a protocol. I
> don't know with what compiler was compiled, I know only that is the
> Linux version, 

Most likely it was compiled with gcc ...
Running "strings -a library.a" may reveal more.

> so I try to link it with my program but I always fail.

The most relevant info here is the *exact* error message.
The next most relevant are the failing link line, the version of
gcc you are using, and whether the library is "C" or "C++".

Unfortunately, you didn't provide any relevant details.
Perhaps you should read this:
http://www.catb.org/~esr/faqs/smart-questions.html

> What kind of problem could it be ?

Assuming the library is C++, the most likely problem is that you
are trying to link g++-3.x compiled code with g++-2.9x.

Code compiled by different versions of g++ is not link-compatible.
If you want to use that library, you must compile/link your code
with the same version of g++ the library was compiled with (the
strings command above will tell you which versions that was).

> Could the library be compiled with a non-gnu compiler ?

Possible; unlikely.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]