cURL / Mailing Lists / curl-library / Single Mail


Re: use libcurl source files directly rather than link with library

From: Daniel Stenberg <>
Date: Tue, 17 May 2011 23:48:09 +0200 (CEST)

On Tue, 17 May 2011, Tom Bishop, Wenlin Institute wrote:

(This whole thread is an excellent show case why I am happy I don't do any
development on or for Mac OS X.)

> Thanks, I just gave that a try. (I might never have thought to look for the
> static library in a hidden folder!) The result I get by cleaning and trying
> to compile is, again, the following error message in Xcode:
> /Users/tbishop/wenlin/c/../curl/include/curl/curlrules.h:143:0
> /Users/tbishop/wenlin/c/../curl/include/curl/curlrules.h:143: error: size of
> array '__curl_rule_01__' is negative
> The message shows that curlrules.h is the one in my project's folder
> (version 7.21.6). It appears that the error occurs during compilation,
> before there is any attempt to link with the library.

Yes. That's a sanity check in the header that makes sure you build now with
the same setup as you did when you built curl, and the information to get out
of that compiler error is that you aren't.

As this particular case checks the size of 'long' it certainly indicates that
that there's a 32/64 bit confusion. So yes, it seems to be exactly what you
said before. You were right and I was wrong.

> checking size of long... (cached) 8
> Can anyone tell me where this "cache" is, and how to clear it?

config.cache by default, see

You can just remove it and rerun configure to make it not use cached values.

> Or is there another way to request a 32-bit library? Or am I wrong in
> believing that a 64-bit library can't be linked with a 32-bit application?

I don't know much about building 32/64 bit versions on Mac, but certainly
there is docs out there for this already? And yes, it is usually not possible
to link a 64-bit library with a 32-bit application.

List admin:
Received on 2011-05-17