I write a simple encryption program with C for Raspberry Pi. It successfully compiled for my X86 CPU with gcc encoder.c -lcrypto -o encoder (I'd installed libssl-dev), but when I want to cross compile it (with arm-linux-gnueabihf-gcc), this error occur:
$ arm-linux-gnueabihf-gcc encoder.c -lcrypto -o encoder
In file included from ./encoder.c:4:0:
/usr/include/openssl/aes.h:55:33: fatal error: openssl/opensslconf.h: No such file or directory
#include <openssl/opensslconf.h>
^
compilation terminated.
How to cross compile an openssl C application for Raspberry Pi?
pi
and passwordraspberry
. Otherwise, you need to setup the shell enviroment for the cross-compile. You need to put tool chain and headers on path, and you need to set some variables likeCROSS_COMPILE
. Checkout the comments in the Configure script. – jww