Hi,

I am trying to build MesaGL on Win32 using VC7. Issues encountered:

A) I am unable to solve the following linkage problem:

------ Build started: Project: osmesa, Configuration: Debug Win32 ------

Linking...
..\..\..\..\src\mesa\drivers\osmesa\osmesa.def(1) : warning LNK4017: DESCRIPTION statement not supported for the target platform; ignored
   Creating library .\Debug/OSMESA32.lib and object .\Debug/OSMESA32.exp
driverfuncs.obj : error LNK2019: unresolved external symbol __tnl_program_string referenced in function __mesa_init_driver_functions
Debug/OSMESA32.DLL : fatal error LNK1120: 1 unresolved externals

BTW, why do I need OSMESA32.DLL?

B) I had compilation problem in mesa and osmesa projects which I managed to fix .

The problem was due to declaration of temporary variable "GLuint i" when using macro RENDER_SPAN. Placing scopes around the macro solves the problem:

                #define RENDER_SPAN( span )                                \
Added Scope -> {\
                   GLuint i;                                                \
                   GLuint *img = (GLuint *) PIXELADDR4(span.x, span.y);        \
                   for (i = 0; i < span.end; i++) {                        \
                      const GLdepth z = FixedToDepth(span.z);                \
                      if (z < zRow[i]) {                                \
                         img[i] = pixel;                                \
                         zRow[i] = z;                                        \
                      }                                                        \
                      span.z += span.zStep;                                \
                   } \
Added Scope -> }
        #include "swrast/s_tritemp.h"

Ps. Microsoft compiler doesn't like defining a variable in the middle of a scope when it compiles C code.

Kovalan