Discussion:
[ast-developers] conflicting types for _sfio_FILE
Rüdiger Schütz
2015-06-13 14:33:34 UTC
Permalink
My environment is Windows 8.1 64 bit, cygwin 64 bit and gcc.

I am trying to 'make' the packages from source, but I am stuck with the
error 'conflicting types for _sfio_FILE'. gcc seems to get confused by
the use of a forward declaration.

I am working with the 'official' releases and with the 'beta' sources.
The error appears with all versions.

The error has been posted in this list in the past, as well as in
several blogs and for different environments.

Thanks for any help.

RÃŒdiger SchÃŒtz
Enzianstraße 32
D-85098 Großmehring
Tel.: +49 8407 930 257
Mobil: +49 178 811 8257
Email: ***@consx.de
Bob Krzaczek
2015-06-15 13:05:23 UTC
Permalink
Post by Rüdiger Schütz
I am trying to 'make' the packages from source, but I am stuck with
the error 'conflicting types for _sfio_FILE'. gcc seems to get
confused by the use of a forward declaration.
It's quite likely a bit deeper than that. Usually, there's a
definition for FILE in your environment that collides with AST's own
definition (the latter being a cpp macro in ast_std.h). Fortunately,
many environments provide a way to switch off the FILE definition,
while leaving (most) everything else intact (e.g., FreeBSD uses
_STDFILE_DECLARED, Solaris uses _FILEDEFED, and so on) that you can
then wire into features/wchar or a similar location.

I don't know Cygwin, so I can't say if it has a similar hook, or if
(alternatively) a well-placed #undef will do the trick (some OS use a
macro, some use a typedef, etc). But, certainly, start with
include/ast_std.h and features/wchar.

Good luck,
Bob
--
Bob Krzaczek, Chester F. Carlson Center for Imaging Science, RIT
phone +1-585-4757196, email ***@cis.rit.edu, icbm 43.08586N 77.67744W
Loading...