openwrt
编译器设置
set(CMAKE_SYSROOT /home/luke/openwrt/openwrt/staging_dir/target-mipsel_24kc_musl)
# 指定交叉编译器 arm-gcc 和 arm-g++
# 直接使用绝对路径
set(CMAKE_C_COMPILER /home/luke/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-gcc)
set(CMAKE_CXX_COMPILER /home/luke/openwrt/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin/mipsel-openwrt-linux-g++)
现象:秒字段为空始终为0
ubuntu
同样的代码,使用gcc编译器,输出正常
解决办法