esqlc compilation problem
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I am trying to compile my program, written in esqlc on an Hpux box. The
c compiler works fine with c programs, but on esqlc programs it returns
this error:
Is there a problem with my code or the configuration of mu esqlc???
thanks
$ esql helloec.ec
(Bundled) cc: "/opt/informix/incl/esql/locator.h", line 111: error 1705:Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/informix/incl/esql/locator.h", line 113: error 1705:
Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/informix/incl/esql/locator.h", line 115: error 1705:
Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/informix/incl/esql/locator.h", line 117: error 1705:
Function prototypes are an ANSI feature.
here is line 111 - 117:
from locator.h:
111 int (*loc_open)(struct tag_loc_t *loc, int flag, int bsize);
112 /* USER: open function */
113 int (*loc_close)(struct tag_loc_t *loc);
114 /* USER: close function*/
115 int (*loc_read)(struct tag_loc_t *loc, char *buffer, int
buflen);
116 /* USER: read function */
117 int (*loc_write)(struct tag_loc_t *loc, char *buffer, int
buflen);
118 /* USER: write function */
Using parameter prototypes in a function pointer declaration is an ANSI C
paradigm. The HP C compiler, by default, only compiles K&R format C. To
enable the ANSI format parser add the -Ae flag to your compile command lines
or edit the esql script so that it is always included by default on all of
the lines near the bottom that begin "exec $CC".
Art S. Kagel
Digiwyrm wrote:
>
> I am trying to compile my program, written in esqlc on an Hpux box. The
> c compiler works fine with c programs, but on esqlc programs it returns
> this error:
>
> Is there a problem with my code or the configuration of mu esqlc???
> thanks
>
> $ esql helloec.ec
> (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 111: error 1705:> Function prototypes are an ANSI feature.
> (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 113: error 1705:
> Function prototypes are an ANSI feature.
> (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 115: error 1705:
> Function prototypes are an ANSI feature.
> (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 117: error 1705:
> Function prototypes are an ANSI feature.
>
> here is line 111 - 117:
>
> from locator.h:
> 111 int (*loc_open)(struct tag_loc_t *loc, int flag, int bsize);
>
> 112 /* USER: open function */
> 113 int (*loc_close)(struct tag_loc_t *loc);
> 114 /* USER: close function*/
> 115 int (*loc_read)(struct tag_loc_t *loc, char *buffer, int
> buflen);
> 116 /* USER: read function */
> 117 int (*loc_write)(struct tag_loc_t *loc, char *buffer, int
> buflen);
> 118 /* USER: write function */
"Art S. Kagel" wrote:
> Using parameter prototypes in a function pointer declaration is an ANSI C
> paradigm. The HP C compiler, by default, only compiles K&R format C. To
> enable the ANSI format parser add the -Ae flag to your compile command lines
> or edit the esql script so that it is always included by default on all of
> the lines near the bottom that begin "exec $CC".
Art,
The Bundled CC on HP-UX does not accept the -Ae option, and
cannot be persuaded to accept prototypes - period. On the odd
occasions where people thought that it did, it turned out that
they were using the HP ANSI C compiler without realizing it.
You're correct about -Ae for the HP ANSI C Compiler, of course.
Digiwyrm,
If you've only got the bundled C compiler and can't get hold of
the HP ANSI C compiler, then you can compile the GNU C Compiler
with it -- but it isn't completely straight-forward. I've
documented how to do it in the DBD::Informix 1.00.PC1 product;
see the hpux-gcc file (or there abouts) in the Notes sub-directory.
You need half a dozen other bits of GNU software to get the job done.
> Digiwyrm wrote:
> >
> > I am trying to compile my program, written in esqlc on an Hpux box. The
> > c compiler works fine with c programs, but on esqlc programs it returns
> > this error:
> >
> > Is there a problem with my code or the configuration of mu esqlc???
> > thanks
> >
> > $ esql helloec.ec
> > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 111: error 1705:> > Function prototypes are an ANSI feature.
> > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 113: error 1705:
> > Function prototypes are an ANSI feature.
> > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 115: error 1705:
> > Function prototypes are an ANSI feature.
> > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 117: error 1705:
> > Function prototypes are an ANSI feature.
> >
> > here is line 111 - 117:
> >
> > from locator.h:
> > 111 int (*loc_open)(struct tag_loc_t *loc, int flag, int bsize);
> >
> > 112 /* USER: open function */
> > 113 int (*loc_close)(struct tag_loc_t *loc);
> > 114 /* USER: close function*/
> > 115 int (*loc_read)(struct tag_loc_t *loc, char *buffer, int
> > buflen);
> > 116 /* USER: read function */
> > 117 int (*loc_write)(struct tag_loc_t *loc, char *buffer, int
> > buflen);
> > 118 /* USER: write function */
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
Jonathan Leffler wrote:
>
> "Art S. Kagel" wrote:
>
> > Using parameter prototypes in a function pointer declaration is an ANSI C
> > paradigm. The HP C compiler, by default, only compiles K&R format C. To
> > enable the ANSI format parser add the -Ae flag to your compile command lines
> > or edit the esql script so that it is always included by default on all of
> > the lines near the bottom that begin "exec $CC".
>
> Art,
>
> The Bundled CC on HP-UX does not accept the -Ae option, and
> cannot be persuaded to accept prototypes - period. On the odd
> occasions where people thought that it did, it turned out that
> they were using the HP ANSI C compiler without realizing it.
> You're correct about -Ae for the HP ANSI C Compiler, of course.
Yeah I missed the "(Bundled)" note in the error messages below and updated
Digiwyrm about that problem myself this AM.
Art S. Kagel
> Digiwyrm,
>
> If you've only got the bundled C compiler and can't get hold of
> the HP ANSI C compiler, then you can compile the GNU C Compiler
> with it -- but it isn't completely straight-forward. I've
> documented how to do it in the DBD::Informix 1.00.PC1 product;
> see the hpux-gcc file (or there abouts) in the Notes sub-directory.
> You need half a dozen other bits of GNU software to get the job done.
>
> > Digiwyrm wrote:
> > >
> > > I am trying to compile my program, written in esqlc on an Hpux box. The
> > > c compiler works fine with c programs, but on esqlc programs it returns
> > > this error:
> > >
> > > Is there a problem with my code or the configuration of mu esqlc???
> > > thanks
> > >
> > > $ esql helloec.ec
> > > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 111: error 1705:> > > Function prototypes are an ANSI feature.
> > > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 113: error 1705:
> > > Function prototypes are an ANSI feature.
> > > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 115: error 1705:
> > > Function prototypes are an ANSI feature.
> > > (Bundled) cc: "/opt/informix/incl/esql/locator.h", line 117: error 1705:
> > > Function prototypes are an ANSI feature.
> > >
> > > here is line 111 - 117:
> > >
> > > from locator.h:
> > > 111 int (*loc_open)(struct tag_loc_t *loc, int flag, int bsize);
> > >
> > > 112 /* USER: open function */
> > > 113 int (*loc_close)(struct tag_loc_t *loc);
> > > 114 /* USER: close function*/
> > > 115 int (*loc_read)(struct tag_loc_t *loc, char *buffer, int
> > > buflen);
> > > 116 /* USER: read function */
> > > 117 int (*loc_write)(struct tag_loc_t *loc, char *buffer, int
> > > buflen);
> > > 118 /* USER: write function */
>
> --
> Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
> Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN
> #include <disclaimer.h>