cosinekitty / astronomy

Astronomy Engine: multi-language calculation of Sun, Moon, and planet positions. Predicts lunar phases, eclipses, transits, oppositions, conjunctions, equinoxes, solstices, rise/set times, and other events. Provides vector and angular coordinate transforms among equatorial, ecliptic, horizontal, and galactic orientations.
MIT License
496 stars 63 forks source link

Add Astronomy_UtcFromTime_Julian and Astronomy_UtcFromTime_Auto #327

Closed sbooth closed 1 year ago

cosinekitty commented 1 year ago

I like the changes you are making. There are a few build errors. We should get you set up with the build tools so you can run all the unit tests.

../../source/c/astronomy.c: In function ‘Astronomy_FormatTime’:
../../source/c/astronomy.c:1411:12: error: implicit declaration of function ‘FormatTime’ [-Werror=implicit-function-declaration]
 1411 |     return FormatTime(time, format, text, size, 2);
      |            ^~~~~~~~~~
../../source/c/astronomy.c: At top level:
../../source/c/astronomy.c:1518:23: error: conflicting types for ‘FormatTime’; have ‘astro_status_t(astro_time_t,  astro_time_format_t,  char *, size_t,  int)’ {aka ‘astro_status_t(astro_time_t,  astro_time_format_t,  char *, long unsigned int,  int)’}
 1518 | static astro_status_t FormatTime(
      |                       ^~~~~~~~~~
../../source/c/astronomy.c:1411:12: note: previous implicit declaration of ‘FormatTime’ with type ‘int()’
 1411 |     return FormatTime(time, format, text, size, 2);
      |            ^~~~~~~~~~
../../source/c/astronomy.c:1518:23: error: ‘FormatTime’ defined but not used [-Werror=unused-function]
 1518 | static astro_status_t FormatTime(
      |                       ^~~~~~~~~~
cc1: all warnings being treated as errors
sbooth commented 1 year ago

I definitely need to get the build tools installed. In the meantime hopefully I've fixed those build errors.