I am trying to archive an iOS 7 App that is using BBHTTP-library which includes libCurl. The built-error:
curl_rule_01 declared as an array with negative size
The code-line in curlrules.h with the error:
[CurlchkszEQ(long, CURL_SIZEOF_LONG)];
I've tried it with these changes in curlbuild.h
#define CURL_SIZEOF_LONG 4
to
#define CURL_SIZEOF_LONG 8`
due to 64 bit, but it didn't change anything.
Be careful: you must NOT change these macros inside curlbuild.h
! This header is generated at configure time and it records (among other things) which architecture is targeted.
If you look at the pre-built static library provided by BBHTTP you can see that it only targets ARMv7
and ARMv7s
architectures:
$ otool -fV External/libcurl.iOS/libcurl.iOS.appstore.a | grep Archive
Archive : External/libcurl.iOS/libcurl.iOS.appstore.a (architecture armv7)
Archive : External/libcurl.iOS/libcurl.iOS.appstore.a (architecture armv7s)
These are 32-bit architectures. Please refer to BBHTTP Dependencies for more details regarding how this static library has been compiled.
If you build an iOS app with iOS 7 as deployment target you certainly have the default archs configured within your build settings. And these defaults include a 32-bit slice, plus a 64-bit slice:
So in such a case you must include a libcurl fat static library that also contains a 64-bit slice (a.k.a arm64
).
The curl iOS build scripts from BBHTTP's author might help you. Otherwise please refer to Nick Zitzmann libcurl pre-built.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With