cURL / Mailing Lists / curl-library / Single Mail


Re: Build 64 bit libCURL on Mac OS X 10.5.x

From: Daniel Johnson <>
Date: Fri, 13 Feb 2009 09:34:08 -0500

On Feb 13, 2009, at 8:59 AM, Michael Wood wrote:

> On Fri, Feb 13, 2009 at 3:21 PM, Daniel Stenberg <>
> wrote:
>> On Fri, 13 Feb 2009, Michael Han wrote:
>>> My question is how could I tell configure that I want build 64 bit
>>> libCURL? Alternatively I could modify the make file generated from
>>> configure
>>> manually but that'll be the last thing I want to do.
>> Well, to answer that question I'd have to first ask you: what gcc
>> options
>> etc are required for you to do this? Is -m64 enough?
> Looks like it:
> $ vi hello.c
> $ gcc -Wall -W -o hello32 hello.c
> $ gcc -Wall -W -m64 -o hello64 hello.c
> $ file hello*
> hello.c: ASCII c program text
> hello32: Mach-O executable i386
> hello64: Mach-O 64-bit executable x86_64
> $ ./hello32
> Hello, World!
> $ ./hello64
> Hello, World!
>> If so, I figure something like this could work:
>> 'CFLAGS=-m64 ./configure'

Yes, '-m64' works and that's what I use for my 64bit curl package for
Fink. You can also use the '-arch' flag to get a specific
architecture, like '-arch x86_64' and multiple '-arch' will give you,
well, multiple architectures. You do have to make sure that any
libraries you link to are also 64bit. All libraries included with OS X
10.5.x are 4-way fat (i386, x86_64, ppc, ppc64) but if you use any
extra libs like libssh2, they may have to be rebuilt.

Received on 2009-02-13