jtsiomb / libdrawtext

Simple library for fast anti-aliased text rendering in OpenGL
GNU Lesser General Public License v3.0
86 stars 13 forks source link

Build fails on macOS with Xcode 15 #19

Closed fxcoudert closed 1 year ago

fxcoudert commented 1 year ago

Build fails on recent macOS (with Xcode 15):

  src/drawgl.c:215:3: error: call to undeclared function 'gluBuild2DMipmaps'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                  gluBuild2DMipmaps(GL_TEXTURE_2D, GL_ALPHA, gmap->xsz, gmap->ysz, GL_ALPHA, GL_UNSIGNED_BYTE, gmap->pixels);
                  ^
  1 error generated.
  make: *** [src/drawgl.o] Error 1

I think it is missing the right header?

jtsiomb commented 1 year ago

Try adding #include <OpenGL/glu.h> right after #include <OpenGL/gl.h> in src/drawgl.c. Does it solve the problem?

jtsiomb commented 1 year ago

Nevermind, I've set up an automated build for macosx to see for myself, and fixed this along with a couple of other issues like the example programs not compiling on macos. Feel free to reopen if you continue to have problems with this.