[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT: X2C library problems



Dale Scheetz writes:
> I've been trying to build a working version of the X2C compiler, and while
> the compiler itself was pretty easy to fix so it would build, the
> libraries are a bit more of a challenge.
> 
> There is no LINUX target for the build, so I'm using the XNX (Xenix)
> target and trying to find the correct set of parameters for gcc.
> 
> The current set I'm attempting to build with are:
> 
>       CCPARMS="-msoft-float -traditional -ansi -funsigned-char"
>       CC=gcc
> 
>       PARMS=" $CCMODE $CCPARMS  \
>               -DNO_PROTOTYPE -DUNIX  -DCURSES  -DM_TERMINFO -DHAS_ANY

>From gcc.info:

    GCC also has some limited support for traditional (pre-ISO) C with
    the `-traditional' option.  This support may be of use for
    compiling some very old programs that have not been updated to ISO
    C, but should not be used for new programs.  It will not work with
    some modern C libraries such as the GNU C library.

[...]

    You cannot use `-traditional' if you include any header files that
    rely on ANSI C features.  Some vendors are starting to ship
    systems with ANSI C header files and you cannot use `-traditional'
    on such systems to compile files that include any system headers.

> Obviously I'm an idiot. So what's the simple solution to my problem?

I suspect you'll have to port the program to modern C.  I'd start by
losing "-traditional -ansi" and seeing where the compiler stops first.

I'm not sure why you think you need the -msoft-float option, reading
the documentation for it seems to imply that it won't even work
without getting some additional libraries.  (But you may have some
reason for using it that I'm not aware of.)

ttfn/rjk



Reply to: