要在 windows下编译第三方 jni 库,但是配置好后,scons 自动使用 windows 风格的编译,将.c编译成 .obj,导致 android arm 交叉编译工具 g++出错。
#######################################################
# Main Build
#######################################################
options = Variables()
options.AddVariables(
EnumVariable('target', 'build target', DefaultTarget(), allowed_values=PLATFORM_TO_TARGET_MAP.values()+CROSS_PLATFORMS+SPECIAL_PLATFORMS),
BoolVariable('stop_on_warning', 'Stop the build on warnings', False),
ListVariable('build_config', 'build configurations', 'Debug', names=['Debug', 'Release'])
)
env = Environment(variables=options)
#del env['MSVS_VERSION']
#env.Replace(HOST_OS=['None'])
#env.Replace(TOOLS=['gcc', 'g++', 'gnulink'])
en