1.下载QNX7.1 SDK并解压
ITL:~/work/tiqnx710$ ls -l
总用量 16
drwxrwxr-x 4 xxx4096 1月 28 13:38 host
-rwxrwxr-x 1 xxx 972 1月 28 13:38 qnxsdp-env.bat
-rwxrwxr-x 1 xxx 1676 1月 28 13:38 qnxsdp-env.sh
drwxrwxr-x 3 xxx 4096 1月 28 13:38 target
xxxITL:~/work/tiqnx710$
2.编译protobuf-c-test
cd protobuf-c-test
mkdir out
cd …
sudo apt install autoconf libtool
source …/…/tiqnx710/qnxsdp-env.sh
./autogen.sh
make -j8
make install
zlog编译类型步骤:
zlog
git clone http://xxxx/zlog.git
cd zlog
git checkout tag-1.2.15
./autogen.sh
./configure --prefix=/home/xxxx/zlog/out --host=aarch64-unknown-nto-qnx CC=aarch64-unknown-nto-qnx7.1.0-gcc CFLAGS=‘-D_QNX_SOURCE -D__linux__’
make -j1
make install
1.json-c 交叉编译
cd json-c
mkdir out
source …/…/tiqnx710/qnxsdp-env.sh
cmake -DCMAKE_SYSTEM_NAME=“QNX” -DCMAKE_SYSTEM_PROCESSOR=“aarch64” -DCMAKE_CXX_COMPILER_ID=“GNU”
-DCMAKE_C_COMPILER=“aarch64-unknown-nto-qnx7.1.0-gcc”
-DCMAKE_CXX_COMPILER=“aarch64-unknown-nto-qnx7.1.0-g++”
-DCMAKE_BUILD_TYPE=“Debug”
-DCMAKE_FIND_ROOT_PATH=“/home/xxx/tiqnx710/target/qnx7”
-DCMAKE_INSTALL_PREFIX=/home/xxxx/json-c/out
-DCMAKE_PREFIX_PATH=/home/xxxx/json-c/out
make -j8
make install
2.查看编译产物
libzip交叉编译类似,按照如下步骤即可:
libzip
git clone http://xxxx/libzip.git
cd libzip
source /homexxxx/tiqnx710/qnxsdp-env.sh
cmake -DCMAKE_SYSTEM_NAME=“QNX” -DCMAKE_SYSTEM_PROCESSOR=“aarch64” -DCMAKE_C_FLAGS=“-fPIC -fvisibility=hidden” -DCMAKE_CXX_COMPILER_ID=“GNU” -DCMAKE_C_COMPILER=“aarch64-unknown-nto-qnx7.1.0-gcc” -DCMAKE_CXX_COMPILER=“aarch64-unknown-nto-qnx7.1.0-g++” -DCMAKE_BUILD_TYPE=“Debug” -DCMAKE_FIND_ROOT_PATH=“/xxxx/qnx710/tiqnx710/target/qnx7/aarch64le” -DCMAKE_INSTALL_PREFIX=/home/xxxlibzip/out -DCMAKE_PREFIX_PATH=/home/xxxx/libzip/out
make -j1
make install