Hi, Ragnar Augustsson ...

On Tue, 7 Nov 2000 [EMAIL PROTECTED] wrote:

> I am having problem linking libssl.a libcrypto.a and my own lib to an 
> application.
[...]
> Then as I started building my application I can not get the gcc or g++ to 
> link to my library. At first I thought I was doing something silly... but 
> then after lot of sweat and tears I tried to omit the code in my library 
> that was using the ssl library and after that g++ could link my 
> application to my library!
> 
> I have tried changing the include order and the only good that did was not 
> to be able to link to the ssl library.
> 
> What is going on here?

on first sight, maybe it could be a name clash of two symbols appearing in
both libraries.  unfortunately you didn't give us the error message you
received, but that could be something like 'duplicate symbol'.

i propose you check for symbols appearing in both libraries and rename
them in yours (rather than in the ssl library).

on linux (in bash syntax) i'd use the follow code to find the duplicated
symbols from liba.a and libb.a:

a="`nm liba.a`"
for i in `nm -p libb.a | grep "^........ . " | cut -c12- | sort -u`
do
  echo "$a" | grep " $i\$"
done

but keep in mind that libraries can contain undefined (U) and local
symbols (lowercase letter) which may exists in several libraries which are
linked together.
                                        Alfe

--  / _|__  __  __   __|       __   __   SECURE INTERNET TECHNOLOGIES
  `/   |   (    __) /  | |  | |  ) /__\  http://www.xtradyne.com
  / \  |   |   (__| \._| (__| |  | \._,  Alexander Fetke, Developer
 '    Technologies AG     --'            [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to