编译过程
(1)./bootstrap.sh
(2) ./b2 toolset=qcc target-os=qnxnto threadapi=pthread link=static -l240 --layout=system --without-python cxxflags="-Vgcc_ntoarmv7le -Y_cxx -Wc,-std=gnu++14 -D_LITTLE_ENDIAN" linkflags="-Vgcc_ntoarmv7le -Y_cxx -lang-c++" -j4
(1)qt pro工程文件中
#boost
INCLUDEPATH+= /home/zoutianming/qnx700/opensource/boost_1_65_0
LIBS += -L/home/zoutianming/qnx700/opensource/boost_1_65_0/stage/lib -lboost_system -lboost_thread -lboost_date_time -lboost_program_options
LIBS += -lstdc++
(2)BSP
由于依赖stdc++库,BSP中需要加入文件 libstdc++.so.6
-Y lib_type
Select the C++ library type to be used (if available); lib_type can be:
_cxx — LLVM C++ library (default)
_gpp — GNU C++ library
<1>下载boost 文件
<2> 将以下两个文件如下修改
--- a/libs/filesystem/src/operations.cpp
+++ b/libs/filesystem/src/operations.cpp
@@ -1410,7 +1410,8 @@ namespace detail
// "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
&& !(defined(__SUNPRO_CC) || defined(sun)) \
- && !(defined(linux) || defined(__linux) || defined(__linux__))
+ && !(defined(linux) || defined(__linux) || defined(__linux__)) \
+ && !(defined(__QNX__) || defined(__QNXNTO__))
if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
!(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
# else // fallback if fchmodat() not supported
diff --git a/tools/build/v2/tools/qcc.jam b/tools/build/v2/tools/qcc.jam
index 3b35578..fc717b7 100644
--- a/tools/build/v2/tools/qcc.jam
+++ b/tools/build/v2/tools/qcc.jam
@@ -219,7 +219,7 @@ if [ os.name ] = NT
actions piecemeal archive
{
$(RM) "$(<)"
- "$(CONFIG_COMMAND)" -A "$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -Vgcc_ntoaarch64le -A "$(<)" "$(>)"
}
<3>执行
./bootstrap.sh
./b2 install link=static toolset=qcc cxxflags="-Vgcc_ntoaarch64le" target-os=qnxnto --prefix=安装路径