Boost logo

Boost Users :

Subject: Re: [Boost-users] [OT] Problem with boost archive. Cannot solve inanyway.
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-09-22 14:45:59


Christopher Jefferson wrote:
>> Note: I have another project which is hung up on a bug with the gcc
>> compiler on Ubuntu.
>> (Ubuntu bug # 629092). I've been unable to get anyone to take it
>> seriously though.
>> The bug is sufficiently fundamental that I wouldn't expect the
>> serialization library to work on that platform.
>
> There is no bug in the compiler, your program is faulty. The problem
> is that you are including <stdio.h>, which includes <sys/types.h> in
> main.c before defining #define _FILE_OFFSET_BITS 64. The second
> include in TESTRIO is then ignored. This leads to inconsistent
> definitions of structures in the two different files and a seg fault.
>
> You can either:
>
> 1) put #define _FILE_OFFSET_BITS 64 at the top of main.c
> 2) include "testrio.h" before <stdio.h> in main.c
>
> either of these fix your problem.

I will try this. I'm not sure it's fair to characterise my example as
faulty though. In any case, Thank you very much.

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net