Hi Kim,
Can you share details for how you are building wolfSSL? Are you cross-compiling for QNX using ./configure CC= or using QNX Momentics directly?
It is important that your build settings for the wolfSSL library and your application match. If using ./configure there is a generated wolfssl/options.h file that needs to get included in your application prior to any other wolfSSL headers. If you are building the wolfSSL sources directly configuration is usually done through your own file "user_settings.h" and a pre-processor macro "WOLFSSL_USER_SETTINGS". We have many templates for user_settings.h in examples/configs.
For me building for that target here are some steps I use:
cd ~
source qnx700/qnxsdp-env.sh
# Destination for static library and includes
mkdir wolfssl_build_qnx
export WOLFSSL_BUILD_DIR=`pwd`/wolfssl_build_qnx
git clone https://github.com/wolfSSL/wolfssl.git
cd wolfssl
./autogen.sh
./configure --host=aarch64 \
CC="aarch64-unknown-nto-qnx7.0.0-gcc" \
AR="aarch64-unknown-nto-qnx7.0.0-ar" \
RANLIB="aarch64-unknown-nto-qnx7.0.0-ranlib" \
--prefix=$WOLFSSL_BUILD_DIR \
--disable-shared --disable-examples --disable-crypttests \
CFLAGS="-DWOLFSSL_HAVE_MIN -DWOLFSSL_HAVE_MAX \
-DFP_MAX_BITS=8192" --enable-fastmath \
--enable-armasm --enable-sp --enable-sp-asm
make
make install
Notes:
• The "source" sets up environment variables that QNX expects.
• The configure is used to cross-compile wolfSSL as a static library for QNX.
• The output is a wolfSSL static library and headers in "wolfssl_build_qnx".
• The “wolfssl/options.h” is generated by ./configure and must be included prior to any other wolf headers in your application.
• The “—enable-armasm” option enables the aarch64 assembly speedups.
• The “--enable-sp” and “--enable-sp-asm” options enable the optimized RSA/DH/ECC math.
• The FP_MAX_BITS=8192 allows 4096-bit keys.
Thanks,
David Garske, wolfSSL