为 iOS 构建,但链接库“libgsl.a”是为 macOS 构建的如何在 gsl Configure 中添加对 iOS 的架构支持

问题描述

我已经成功创建了 libgsl.a,但无法在 arm64 架构(iOS 设备)中使用。

如何在 gsl 配置文件添加这种架构支持?有什么想法吗?

我尝试了这两个配置,但得到了同样的错误

1.

 ./configure CC="gcc -arch x86_64" \
                 CXX="g++ -arch x86_64" \
                 CPP="gcc -E" CXXCPP="g++ -E"
  1. sudo ./configure --disable-shared --disable-dependency-tracking --host=armv64-apple-darwin10 CFLAGS="-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk" CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm64-apple-darwin10-gcc-4.2.1" CPP=cpp LDFLAGS="-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)