Page 1 of 1

Compiling Error Building DBF Editor

Posted: March 5th, 2021, 4:56 pm
by mw2931
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

Re: Compiling Error Building DBF Editor

Posted: March 8th, 2021, 9:29 am
by sonny.zinn
The compilation error was fixed in June 2020. Please use the latest release of the source code.

Re: Compiling Error Building DBF Editor

Posted: March 9th, 2021, 1:03 pm
by mw2931
Thanks Sonny,

I see, I was using 5.0.0 but will try with 5.0.2 Thank you!

Best,

Michael