JHGuitarFreak / UQM-MegaMod

A fork of The Ur-Quan Masters + HD-mod that remasters the HD graphics with a veritable smorgasbord of extra features, options, QoL improvements, and much more...
https://uqm-mods.sourceforge.net
GNU General Public License v2.0
80 stars 22 forks source link

min and max are only defined by default in visual studio. #21

Closed Kokokokoka closed 4 years ago

Kokokokoka commented 4 years ago
obj/release/src/libs/sound/mixer/mixer.c.o: in function `mixer_Sourcefv':
mixer.c:(.text+0x19e6): undefined reference to `max'
collect2: error: ld returned 1 exit status

this helps: ./src/libs/sound/mixer/mixer.c

#ifndef MAX
#define min(X,Y) (((X) < (Y)) ? (X) : (Y))
#define max(X,Y) (((X) > (Y)) ? (X) : (Y))
#endif
Serosis commented 4 years ago

Took me awhile to get to it but I added definitions for min/max above the (mixer_Sourcefv) function when Visual Studio is out of the picture.

I can get this fixed properly in the future once I get back into the swing of things.

Kokokokoka commented 4 years ago

Thank you! I've got a problem with saving config files on Linux. Will report this later.