I'm trying to compile HYSPLIT from source to get around some issues we have with the pre-compiled version's use of relative directories.
However, I have run into an error when compiling when it starts building the dbf editor:
Building the dbf editor [Fri Mar 5 14:56:54 EST 2021]
ERROR: see '/.../opt/hysplit-5.0.0/hysplit.v5.0.0/make.2021-03-05.log' for details
When I review the log I find this:
==============================================================================
Building the dbf editor [Fri Mar 5 14:56:54 EST 2021]
------------------------------------------------------------------------------
...
gcc -I../include -o ../../../exec/txt2dbf txt2dbf.c -L./ -lDbf
txt2dbf.c: In function ‘main’:
txt2dbf.c:167:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int k = 1; k < len; k++) input[k-1] = input[k];
^
txt2dbf.c:167:3: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [txt2dbf] Error 1
make[1]: Leaving directory `/.../opt/hysplit-5.0.0/hysplit.v5.0.0/gisprog/dbf/source'
=============================================================================
I've tried this into the Makefile & Makefile.inc to set a CFLAG for -std=c99 but it doesn't seem to work;
CFLAGS+=" -std=c99"
Has anyone run into something similar to this and been able to solve it?
Thank you!
Best,
Michael
Compiling Error Building DBF Editor
-
- Posts: 362
- Joined: May 8th, 2019, 1:31 pm
- Registered HYSPLIT User: Yes
Re: Compiling Error Building DBF Editor
The compilation error was fixed in June 2020. Please use the latest release of the source code.
Re: Compiling Error Building DBF Editor
Thanks Sonny,
I see, I was using 5.0.0 but will try with 5.0.2 Thank you!
Best,
Michael
I see, I was using 5.0.0 but will try with 5.0.2 Thank you!
Best,
Michael