Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make legacy fails #240

Open
jbirky opened this issue Mar 29, 2023 · 0 comments
Open

make legacy fails #240

jbirky opened this issue Mar 29, 2023 · 0 comments

Comments

@jbirky
Copy link

jbirky commented Mar 29, 2023

When running make legacy there is the following error with declared variables in POISE:

gcc -o bin/vplanet src/*.c -lm -DGITVERSION=\"v1.0.0-1643-gc2fd79de8915981786f11adaec39f9965517a557\"
src/poise.c: In function ‘fvPoiseSeasonalInitialize’:
src/poise.c:6792:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (int iLat = 0; iLat < body[iBody].iNumLats; iLat++) {
   ^
src/poise.c:6792:3: note: use option -std=c99 or -std=gnu99 to compile your code
src/poise.c: In function ‘fvFluxesByLatitude’:
src/poise.c:6886:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (int iLat = 0; iLat < body[iBody].iNumLats; iLat++) {
  ^
src/poise.c:6902:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int jLat = 0; jLat < body[iBody].iNumLats; jLat++) {
     ^
src/poise.c: In function ‘fvCalculateSeaIce’:
src/poise.c:7074:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
   for (int iLat = 0; iLat < body[iBody].iNumLats; iLat++) {
   ^
make: [legacy] Error 1 (ignored)

this apparently happens on machines where the standard is not set to C99. Either this issue should be fixed in POISE or the makefile should specify std

-gcc -o bin/vplanet src/*.c -std=c99 -lm -DGITVERSION=\"$(GITVERSION)\"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant