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-boun...@lists.freedesktop.org [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of Dorrington, Albert Sent: Tuesday, January 14, 2014 1:43 PM To: mesa-dev@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@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 ); }
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev