I have built numerous versions of curl using the wonderful "build_curl" script i found on GitHub. I have also rebuild curl using other techniques.
But I always end up with the same issue.
I have an iOS project which links against curl. I can build and debug on the simulator (clearly using i386). I can build and debug with a device as long as I choose to only build the current architecture and the device is plugged in when I build.
However, if I choose to try to build Release OR if I choose to build Debug for 'iOS Device' with no device plugged in. I always end up with the following error:
curlrules.h:143:6: '__curl_rule_01__' declared as an array with a negative size
This is caused by this:
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
typedef char
__curl_rule_01__
[CurlchkszEQ(long, CURL_SIZEOF_LONG)];
This #define exists in curlbuild.h
#define CURL_SIZEOF_LONG 4
Which should be correct, because I am building for a 32 bit architecture, however, Xcode has decided that sizeof(long) != 4, and so the Macro generates an error.
I have chosen to only build for armv7 and armv7s, and still I get this error.
I do not understand why this will not build.