[ocaml-ctypes] Build error when compiling Ctypes on centos 5
Jeremy Yallop
yallop at gmail.com
Wed May 13 14:25:49 BST 2015
On 13 May 2015 at 14:08, Thomas Braibant <thomas.braibant at gmail.com> wrote:
> On Wed, May 13, 2015 at 3:03 PM, Jeremy Yallop <yallop at gmail.com> wrote:
>> On 13 May 2015 at 13:51, Thomas Braibant <thomas.braibant at gmail.com>
>> wrote:
>> > /home/vagrant/ocamlbrew/ocaml-4.02.1/.opam/4.02.1+PIC/build/ctypes.0.4.0/src/ctypes/ctypes_primitives.h:99:3:
>> > error: #error "No suitable OCaml type available for representing long
>> > longs"
>>
>> That's odd. Could you post the output of the following program?
>
> gcc c.c
> c.c: In function ‘main’:
> c.c:10: error: ‘ULLONG_MAX’ undeclared (first use in this function)
Hmm. I didn't realise that long long support was such a recent
addition to GCC. Do you know whether it supports any 64-bit integer
types? If it supports int64_t and uint64_t, for example, then you
might be able to get quite far with running something like this on the
ctypes code:
find . -name '*.c' -o -name '*.h' | xargs sed -i 's!unsigned long
long!uint64_t!g; s!long long!int64_t!g; s!LLONG!INT64!g'
More information about the Ctypes
mailing list