[Mesa-dev] Building Mesa for Windows using Visual Studio

Predut, Marius marius.predut at intel.com
Fri Apr 3 05:34:16 PDT 2015

How I build mesa on windows:

1.install Microsoft vs 2013(not 2012 or less).

2.install last python 2.7 : https://www.python.org/downloads/
install pywin32 from http://heanet.dl.sourceforge.net/project/pywin32/pywin32/Build%20219/pywin32-219.win32-py2.7.exe
download win flex-bison from http://sourceforge.net/projects/winflexbison/
and unzip into c:\win_flex_bison

3.Environment settings.
Add these near the top of your PATH:
if you use proxy add FTP_PROXY and HTTP_PROXY env. variables.

4.install pip by downloading get-pip.py file from:
and then run:
python get-pip.py --proxy="[user:passwd@]proxy.server:port"

5.Add mako, lxml and NumPy python modules by pip
pip install Mako
pip install lxml
pip install NumPy (not mandatory I think)

6.install scons from http://sourceforge.net/projects/scons/?source=typ_redirect

7.Build mesa:
scons build=release machine=x86 platform=windows libgl-gdi
or simple run: scons.
This should create an opengl32.dll in build\windows-x86\gallium\targets\libgl-gdi


Why vs 2013 and not vs 2012:
the VS 2012  partially implement C++ TR1 C99 standard library already used into the  latest upstream mesa.
In vs 2012 the math.h don't include rint, rintf, rintl library support used in mesa even if the MSDN say contrary :
Mesa uses those API in mesa\src\util\rounding.h.


From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On Behalf Of Shervin Sharifi
Sent: Wednesday, March 25, 2015 3:01 AM
To: mesa-dev at lists.freedesktop.org
Subject: [Mesa-dev] Building Mesa for Windows using Visual Studio

 I'm new to Mesa.
 I'm trying to build Mesa for Windows using Visual Studio, but couldn't find instructions for that. The related threads on this mailing list also seem outdated.
 Could anyone give me some hint or point me to instructions if there is any?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150403/3e3aaa68/attachment-0001.html>

More information about the mesa-dev mailing list