Hi! Lutz,
I am so thankful to you.It finally worked, but could you please tell me why
my code was building fine when I was not using OpenSSL.
Thanks and regards.
-Fateh
P.S. But the problem with des.h stays for I am forcing the OpenSSL lib to
use a different signature of the crypt function by defining
HEADER_DES_LOCL_H. Not doing so makes the compiler to complain saying
"/usr/include/unistd.h", line 169: Error: Only one of a set of overloaded
functions can be "C" or "Pascal".
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Lutz Jaenicke
Sent: Thursday, January 04, 2001 1:06 AM
To: [EMAIL PROTECTED]
Subject: Re: overloaded functions..commenting out doesn't works!!
On Wed, Jan 03, 2001 at 05:55:05PM -0800, Fateh Kausar wrote:
> The des.h translation unit says
>
> #ifdef HEADER_DES_LOCL_H
> char *crypt(const char *buf,const char *salt);
> #else
> char *crypt();
> #endif
>
> I tried forcing the OpenSSL library to use char *crypt(const char*, const
> char*) by inserting the following line before a call to include ssl.h
> #define HEADER_DES_LOCAL_H
>
> The unistd.h uses char * crypt(const char*, const char*)
>
> My code compiles fine, but at the time of linkage the build fails with the
> following error message
>
> Undefined first referenced
> symbol in file
> __umoddi3
> /home/fkausar/instal/openssl-0.9.2b/libcrypto.a(bn_word.o)
> ld: fatal: Symbol referencing errors. No output written to clecclient
> make: *** [clecclient] Error 1
>
> I get the same error if I try to comment out the line char *crypt(); in
> des.h compile OpenSSL library and then do a remake of my files.
>
> Is it a bug in the OpenSSL..I don't think so but am in a fix..please help!
Let's start with some good advice: 0.9.2b is dead and gone, we are at 0.9.6
now with a lot of enhancements and bugs fixed. It is worth to upgrade!
Now to your problem: __umoddi3 is a symbol created by gcc that is satisfied
by linking against -lgcc. This should happen automatically when also linking
with gcc. I have seen these problems when linking in a gcc-compiled library
when actually using the normal cc on HP-UX (this should also apply to all
other platforms not using gcc as normal compiler). There are two possible
solutions: recompile openssl with the native compiler of your platform
or explicitly link agains libgcc by adding
-L/usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.2 -lgcc
(your location of libgcc.a may vary).
Best regards,
Lutz
PS. This problem is not related to your des.h header problem.
--
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]