supertuxkart-sourceforge-migration / stk-migration-test

0 stars 0 forks source link

Make STK compile with clang on osx #757

Open supertuxkart-sourceforge-migration opened 10 years ago

supertuxkart-sourceforge-migration commented 10 years ago

Author: hikerstk

The following changes are necessary to compile STK with clang on osx (thanks to supermat)

Changed files:

In lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h, I changed line 2390 (long GLuint) just to (long). Then in lib/irrlicht/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h, I changed the lines with: BEGIN CODE class NSWindow; class NSOpenGLContext; class NSBitmapImageRep; END CODE to BEGIN CODE

ifndef OBJC

class NSWindow; class NSOpenGLContext; class NSBitmapImageRep;

endif

END CODE And finally in src/utils/random_generator.hpp, I added #include after #include .

I also attach the build-log, which contains some potentially interesting warnings we should take care of.

Migrated-From: https://sourceforge.net/apps/trac/supertuxkart/ticket/1077

supertuxkart-sourceforge-migration commented 10 years ago

Author: auria I applied the safe parts in SVN. The long GLuint part remains, not sure what to do about this one without breaking anything (I guess a proper fix would imply checking what GLuint resolves to on this setup)

supertuxkart-sourceforge-migration commented 10 years ago

Author: hikerstk Can we just apply a patch like this?

Index: COpenGLExtensionHandler.h

--- COpenGLExtensionHandler.h (revision 14418) +++ COpenGLExtensionHandler.h (working copy) @@ -2387,7 +2387,11 @@

elif defined(GL_ARB_geometry_shader4)

    glProgramParameteriARB(program, pname, value);

elif defined(GL_EXT_geometry_shader4)

+# ifdef clang

supertuxkart-sourceforge-migration commented 10 years ago

Author: auria Joerg's patch committed in svn. What's left is to verify it actually works, and perhaps look at the warnings in the build log. But since we use GCC to produce release builds, that's no release blocker