Hi Marek,
 
  Thanks for your reply.
  I think the libssl.a and libcrypto.a should be ok. Maybe myAPI.a had failed to link libssl.a and libcrypto.a into itself? 
  Later I try another way: when I make myUI, I link to not only myAPI.a, but also libssl.a and libcrypto.a all. It seems that the openssl api can be found.
  Now, my question is: Can I link a lib(.a) into another lib(.a)?
  Thanks a lot!

Best Regards!
-
Cruise
 
On 11/14/06, Marek Marcola <[EMAIL PROTECTED] > wrote:
Hello,
>
>   I am working on a small network application on Linux(kernel version
> is 2.4.20-8 ), comprise of two parts: myUI and myAPI(which is .a lib).
>   Now i need add SSL to the application. I have installed OpenSSL
> in /usr/local, and i can find head files in /usr/local/include/openssl
> and libssl.a, libcrypto.a in /usr/local/lib.
>   In myAPI source codes, i will call OpenSSL functions. So, I link to
> libssl.a and libcrypto.a  when i make myAPI.a . That's no problem.
>   But when i make myUI, that need link to myAPI.a which has linked to
> libssl.a and libcrypto.a, the result is many OpenSSL api can't not be
> found. For example:
> ......
>   myAPI.a(.text+0xdc7): in function 'SendReq': undefined reference to
> 'SSL_write'
> ......
>
>   I think libssl.a and libcrypto.a are static libs, so does myUI.a.
> Why the compiler can not find the openssl api?
>
>   If anyone can give me a explaination in details? Thanks a lot.
Your static library is only a set of object files created with ar
command - nothing more. You may look inside with command:
       $ ar tv myAPI.a
to check its contents, you may look in OpenSSL library:
       $ ar tv libcrypto.a
to check that this object files are not in your library.

Best regards,
--
Marek Marcola < [EMAIL PROTECTED]>

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

Reply via email to