[Mesa-dev] Error Building Mesa 10.0.1 on Windows

Dorrington, Albert albert.dorrington at lmco.com
Tue Jan 14 10:51:12 PST 2014


A little further investigation, it looks like the correct solution is to replace the call to roundf() with IROUND() which is defined in src\mesa\main\imports.h

From: mesa-dev-bounces at lists.freedesktop.org [mailto:mesa-dev-bounces at lists.freedesktop.org] On Behalf Of Dorrington, Albert
Sent: Tuesday, January 14, 2014 1:43 PM
To: mesa-dev at lists.freedesktop.org
Subject: EXTERNAL: [Mesa-dev] Error Building Mesa 10.0.1 on Windows

I'm attempting to build Mesa 10.0.1 on Windows (Win7, 64-bit) using the scons interface.

Currently getting the following error:
link /nologo /fixed:no /incremental:no /dll /out:build\windows-x86-debug\gallium\targets\libgl-gdi\opengl32.dll build\windows-x86-debug\gallium\state_
trackers\wgl\wgl.lib build\windows-x86-debug\gallium\winsys\sw\gdi\ws_gdi.lib build\windows-x86-debug\mapi\glapi\glapi.lib build\windows-x86-debug\mes
a\mesa.lib build\windows-x86-debug\gallium\drivers\softpipe\softpipe.lib build\windows-x86-debug\gallium\drivers\trace\trace.lib build\windows-x86-deb
ug\gallium\drivers\rbug\rbug.lib build\windows-x86-debug\gallium\auxiliary\gallium.lib build\windows-x86-debug\glsl\glsl.lib gdi32.lib user32.lib kern
el32.lib ws2_32.lib /PDB:build\windows-x86-debug\gallium\targets\libgl-gdi\opengl32.pdb /DEBUG build\windows-x86-debug\gallium\targets\libgl-gdi\libgl
_gdi.obj /def:src\gallium\state_trackers\wgl\opengl32.def
  Creating library build\windows-x86-debug\gallium\targets\libgl-gdi\opengl32.lib and object build\windows-x86-debug\gallium\targets\libgl-gdi\opengl
32.exp
mesa.lib(texparam.obj) : error LNK2019: unresolved external symbol _roundf referenced in function __mesa_GetTexParameteriv at 12
build\windows-x86-debug\gallium\targets\libgl-gdi\opengl32.dll : fatal error LNK1120: 1 unresolved externals
scons: *** [build\windows-x86-debug\gallium\targets\libgl-gdi\opengl32.dll] Error 1120
scons: building terminated because of errors.

It seems that on Windows, there is no roundf() defined in the math libraries.
I see that there is a roundf() defined in src\gallium\auxiliary\util\u_math.h, but I don't see any equivalent utility library in the src\mesa section of code.

If I include the following code at the top of src\mesa\main\texparam.c, the code compiles on Windows, but I don't think this is necessarily the right solution.

static INLINE float
roundf(float x)
{
  return x > 0.0f ? floorf( x + 0.5f ) : ceilf( x - 0.5f );
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140114/2d7e68cc/attachment.html>


More information about the mesa-dev mailing list