>       From: owner-openssl-us...@openssl.org On Behalf Of Nahid Alam
>       Sent: Saturday, 18 June, 2011 19:00

>       So I cross compiled OpenSSL following the link  
> http://www.crosscompile.org/static/pages/OpenSSL.html

That uses the 'dist' config with minimal tool changes, 
which does static libraries (presumably) because there 
is no single portable way to do shared libraries. 
The only Configure case I see for ARM is linux-armv4 
and it does do linux-shared, but I have no idea if that 
works correctly on your target, or if you even want it.

>       And used the following command
>       $ arm-none-linux-gnueabi-gcc -Wall -I/PATH_TO_INCLUDE_HEADER   
> -L/PATH_TO_CROSS_COMPILED_OpenSSL_LIB  -lssl -lcrypto -o test test.c 
>       But getting the errors:
>       openssl-arm-aes.c: In function 'main':
>       openssl-arm-aes.c:44:10: warning: unused variable 'e'
>       /tmp/ccaF9kYf.o: In function `time_aes':
>       openssl-arm-aes.c:(.text+0x1cc): undefined reference to
`EVP_CIPHER_CTX_init'
<snip rest>
>       Looks like I am missing something really silly. Any suggestion?

And most C implementations including gcc at least for 
a static library, the library must be in the (linker) 
command line AFTER the module(s) that reference it. 
Also you don't need -lssl for EVP_* (but it doesn't hurt).

But gcc (and binutils) should display your actual source 
filename, allegedly 'test.c'. Unless you just changed 
'openssl-arm-aes.c' to 'test.c' for posting.
        


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to