curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

SIZEOF_LONG undefined when cross-compiling for iOS

From: Jonas Vautherin via curl-library <>
Date: Fri, 17 May 2019 09:05:28 +0200


I have been trying to cross-compile curl for iOS, using leetal's toolchain
[1] (and another, similar one that has the same issue).

When building for the "Xcode" cmake generator (cmake -G Xcode <...>), curl
build successfully. But when building for the "Unix Makefiles" generator, I
get an error saying that SIZEOF_LONG is undefined.

I see that SIZEOF_LONG is defined in curl_config.h.cmake [2], but I don't
really get where it comes from. It seems like it gets defined somehow by
Xcode, but not when building using clang directly (Unix Makefiles).

Should I set it somewhere manually? And if yes, it is always right to say
that it should be "8" on 64-bits archs, and "4" on 32-bits archs (as
described here [3])?


Received on 2019-05-17