J
johnnieboy
I am trying to compile the program hull
http://cm.bell-labs.com/netlib/voronoi/hull.html
This is quite a complicated program that involves several .c files
I get several warnings during compilation and the error:
hullmain.c:40: initializer element is not constant
This is the offending line:
FILE *INFILE, *OUTFILE, *DFILE = stderr, *TFILE;
It is part of many lines of stuff that occur before main()
hullmain.c includes hull.h, and in hull.h I find:
FILE* efopen(char *, char *);
extern FILE *DFILE;
I think the mysterious "initializer element" error is related to
*DFILE = stderr
in hullmain.c
If I remove this bit I can get the program to compile (but it segfaults
when I run it
What is the proper way to initialize the pointer *DFILE to be stderr?
If anyone can offer any tips on what is wrong and how to correct it,
I'd greatly appreciate it.
Thanks!
Bill
http://cm.bell-labs.com/netlib/voronoi/hull.html
This is quite a complicated program that involves several .c files
I get several warnings during compilation and the error:
hullmain.c:40: initializer element is not constant
This is the offending line:
FILE *INFILE, *OUTFILE, *DFILE = stderr, *TFILE;
It is part of many lines of stuff that occur before main()
hullmain.c includes hull.h, and in hull.h I find:
FILE* efopen(char *, char *);
extern FILE *DFILE;
I think the mysterious "initializer element" error is related to
*DFILE = stderr
in hullmain.c
If I remove this bit I can get the program to compile (but it segfaults
when I run it
What is the proper way to initialize the pointer *DFILE to be stderr?
If anyone can offer any tips on what is wrong and how to correct it,
I'd greatly appreciate it.
Thanks!
Bill