<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vicne</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vicne"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Vicne/"/>
	<updated>2026-11-04T16:27:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSTroubleShooting&amp;diff=17195</id>
		<title>Win32CompileMSYSTroubleShooting</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSTroubleShooting&amp;diff=17195"/>
		<updated>2010-10-16T08:29:01Z</updated>

		<summary type="html">&lt;p&gt;Vicne: (minor formating changes)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of various errors that have occurred &amp;quot;over the years&amp;quot; during [[Win32CompileMSYSNew|building VLC with windows]], with their resolutions.   Of course, if it&#039;s not here, google is your friend.&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;unix2dos&amp;quot; command not found:  this meant &amp;quot;you forgot to install mingw-utils&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Originally, there was apparently a bug with 4.4.0 GCC (not 4.4.1), fixed thus (except that in reality, you must use TDM, not vanilla GCC, because you need sljl exception handling):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;br /&gt;
*If building self-contained packages fails with &#039;&#039;make: zip: Command not found&#039;&#039; then download the following file and extract it to C:\Msys\1.0 :&lt;br /&gt;
http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/m/project/mi/mingw/MSYS/zip/zip-3.0-1/zip-3.0-1-msys-1.0.14-bin.tar.lzma&lt;br /&gt;
*If building self-contained packages fails with &#039;&#039;make: 7z: Command not found&#039;&#039; then copy 7z.exe from C:\Program Files\7-Zip in to C:\Msys\1.0\bin&lt;br /&gt;
*If building self-contained packages fails with &#039;&#039;Error: cannot locate makensis tool&#039;&#039; then use:&lt;br /&gt;
&amp;lt;pre&amp;gt;PATH=/c/Program\ Files/NSIS/:$PATH make package-win32&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16307</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16307"/>
		<updated>2010-06-13T16:06:47Z</updated>

		<summary type="html">&lt;p&gt;Vicne: add contrib bin path before make&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks. If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in VLC_COMPILED_BY constant. &lt;br /&gt;
&lt;br /&gt;
Type the following command&amp;amp;nbcp;: &lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16306</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16306"/>
		<updated>2010-06-13T16:05:44Z</updated>

		<summary type="html">&lt;p&gt;Vicne: /* Compile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks. If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in VLC_COMPILED_BY constant.&lt;br /&gt;
&lt;br /&gt;
Type the following command :&lt;br /&gt;
 &lt;br /&gt;
 PATH=/usr/win32/bin:$PATH make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16305</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16305"/>
		<updated>2010-06-13T15:14:10Z</updated>

		<summary type="html">&lt;p&gt;Vicne: Re-add configure-msys and configure-common as they are not in 1.1.0rc3 tarball&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks. If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in COMPILED_BY constant &lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16304</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16304"/>
		<updated>2010-06-13T15:04:01Z</updated>

		<summary type="html">&lt;p&gt;Vicne: /* Compile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks. If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in COMPILED_BY constant &lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16303</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16303"/>
		<updated>2010-06-13T14:35:03Z</updated>

		<summary type="html">&lt;p&gt;Vicne: /* VLC sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks. If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If Your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in COMPILED_BY constant &lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16302</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16302"/>
		<updated>2010-06-13T13:56:06Z</updated>

		<summary type="html">&lt;p&gt;Vicne: rc -&amp;gt; rc3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks and . If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If Your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in COMPILED_BY constant &lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16301</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16301"/>
		<updated>2010-06-13T13:55:31Z</updated>

		<summary type="html">&lt;p&gt;Vicne: remove reference to &amp;quot;multiple manipulations&amp;quot; as there is none anymore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the &#039;&#039;&#039;fastest&#039;&#039;&#039; and &#039;&#039;&#039;recommended &#039;&#039;&#039;way to build VLC natively on Windows. &lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time. &lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have. &lt;br /&gt;
&lt;br /&gt;
== Unzip Utility  ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs &lt;br /&gt;
&lt;br /&gt;
== Browser&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox] or another modern browser (NOT&amp;amp;nbsp;Internet Explorer) &lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039; &lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039; &lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*unckeck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run C:\MSys\1.0\msys.bat &lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks and . If you want chose that route, please follow instructions on the [[Git Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
= Last changes&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto line 4728 &lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile  ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If Your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in COMPILED_BY constant &lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work). &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
*It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
*Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt; &lt;br /&gt;
*If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16281</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16281"/>
		<updated>2010-06-13T11:27:43Z</updated>

		<summary type="html">&lt;p&gt;Vicne: TDM/MinGW Link updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required (who would want to build VLC without having command-line experience ?). Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
==On the edge vs Conservative==&lt;br /&gt;
This update aims at building version 1.1.0rc (latest official build at time of writing) natively in the most straightforward way.&lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot; :-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010.&lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc&lt;br /&gt;
&lt;br /&gt;
= Windows tools needed =&lt;br /&gt;
== Text editor ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor.&lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether.&lt;br /&gt;
You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility ==&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised.&lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
== Browser == &lt;br /&gt;
// TODO - is Firefox really needed ?&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox]&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system.&lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;lt;username&amp;gt;&amp;quot;. Replace it appropriately where needed of course.&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039;&lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download&lt;br /&gt;
&lt;br /&gt;
Go through the wizard:&lt;br /&gt;
* unckeck &amp;quot;Check for updated files...&amp;quot;&lt;br /&gt;
* Select &amp;quot;Create&amp;quot;&lt;br /&gt;
* install to C:\MinGW&lt;br /&gt;
* keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils ===&lt;br /&gt;
&lt;br /&gt;
TODO - Is this step needed ?&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz&lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys == &lt;br /&gt;
=== MSys Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0&lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows:&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed? :   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit ===&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe&lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values&lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0:&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0:&lt;br /&gt;
&lt;br /&gt;
* http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip&lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat:&lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read :&lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]).&lt;br /&gt;
Unfortunately, no binaries are provided so you need to compile them.&lt;br /&gt;
&lt;br /&gt;
* Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz&lt;br /&gt;
* Uncompress it in your home folder (C:\MSys\1.0\home\&amp;lt;username&amp;gt;)&lt;br /&gt;
* run C:\MSys\1.0\msys.bat&lt;br /&gt;
* type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands:&lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : Alternatively, you can get the latest contrib from :http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : This section lists the steps for VLC version 1.1.0rc. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks and will avoid the need for multiple manipulations described here. If you want chose that route, please follow instructions on the [[Git_Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc ==&lt;br /&gt;
&lt;br /&gt;
* download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc/vlc-1.1.0-rc.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0\home\&amp;lt;username&amp;gt;&lt;br /&gt;
* rename the vlc-1.1.0rc dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
== add missing vlc_windows_interfaces.h ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc/vlc-1.1.git;a=blob_plain;f=include/vlc_windows_interfaces.h;h=36bfd4a64b1ec9b9b5da0e21de6d93f53f2eefc3;hb=3a4b30fcf1fbb9ef7a9c85a102183f8a3451622a&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\include\vlc_windows_interfaces.h&lt;br /&gt;
&lt;br /&gt;
== duplicate missing position.h ==&lt;br /&gt;
&lt;br /&gt;
Duplicate the file as follows:&lt;br /&gt;
 source: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\mozilla\control\position.h&lt;br /&gt;
 target: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\activex\position.h&lt;br /&gt;
&lt;br /&gt;
== add dummy lua extension ==&lt;br /&gt;
* create the directory C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions&lt;br /&gt;
* create an empty file and save it as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions\readme.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Last changes : whoami and hostname =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami ==&lt;br /&gt;
Create a new file containing the single line:&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;username&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension)&lt;br /&gt;
&lt;br /&gt;
== Hostname ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows:&lt;br /&gt;
* open C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\configure.ac&lt;br /&gt;
* goto line 4728&lt;br /&gt;
* change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned&lt;br /&gt;
&lt;br /&gt;
== Bootstrap ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile ==&lt;br /&gt;
&lt;br /&gt;
Note : If Your &amp;lt;username&amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;lt;username&amp;gt;\config.h and double all backslashes in COMPILED_BY constant&lt;br /&gt;
&lt;br /&gt;
 ./compile&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands:&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file).&lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
* It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&lt;br /&gt;
* Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change&lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16280</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16280"/>
		<updated>2010-06-13T08:34:35Z</updated>

		<summary type="html">&lt;p&gt;Vicne: acknowledgements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required (who would want to build VLC without having command-line experience ?). Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
==On the edge vs Conservative==&lt;br /&gt;
This update aims at building version 1.1.0rc (latest official build at time of writing) natively in the most straightforward way.&lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot; :-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010.&lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc&lt;br /&gt;
&lt;br /&gt;
= Windows tools needed =&lt;br /&gt;
== Text editor ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor.&lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether.&lt;br /&gt;
You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility ==&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised.&lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
== Browser == &lt;br /&gt;
// TODO - is Firefox really needed ?&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox]&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system.&lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;lt;username&amp;gt;&amp;quot;. Replace it appropriately where needed of course.&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039;&lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download&lt;br /&gt;
&lt;br /&gt;
Go through the wizard:&lt;br /&gt;
* unckeck &amp;quot;Check for updated files...&amp;quot;&lt;br /&gt;
* Select &amp;quot;Create&amp;quot;&lt;br /&gt;
* install to C:\MinGW&lt;br /&gt;
* keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils ===&lt;br /&gt;
&lt;br /&gt;
TODO - Is this step needed ?&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz&lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys == &lt;br /&gt;
=== MSys Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0&lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows:&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed? :   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit ===&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe&lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values&lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0:&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0:&lt;br /&gt;
&lt;br /&gt;
* http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip&lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat:&lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read :&lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]).&lt;br /&gt;
Unfortunately, no binaries are provided so you need to compile them.&lt;br /&gt;
&lt;br /&gt;
* Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz&lt;br /&gt;
* Uncompress it in your home folder (C:\MSys\1.0\home\&amp;lt;username&amp;gt;)&lt;br /&gt;
* run C:\MSys\1.0\msys.bat&lt;br /&gt;
* type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands:&lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : Alternatively, you can get the latest contrib from :http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : This section lists the steps for VLC version 1.1.0rc. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks and will avoid the need for multiple manipulations described here. If you want chose that route, please follow instructions on the [[Git_Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc ==&lt;br /&gt;
&lt;br /&gt;
* download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc/vlc-1.1.0-rc.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0\home\&amp;lt;username&amp;gt;&lt;br /&gt;
* rename the vlc-1.1.0rc dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
== add missing vlc_windows_interfaces.h ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc/vlc-1.1.git;a=blob_plain;f=include/vlc_windows_interfaces.h;h=36bfd4a64b1ec9b9b5da0e21de6d93f53f2eefc3;hb=3a4b30fcf1fbb9ef7a9c85a102183f8a3451622a&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\include\vlc_windows_interfaces.h&lt;br /&gt;
&lt;br /&gt;
== duplicate missing position.h ==&lt;br /&gt;
&lt;br /&gt;
Duplicate the file as follows:&lt;br /&gt;
 source: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\mozilla\control\position.h&lt;br /&gt;
 target: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\activex\position.h&lt;br /&gt;
&lt;br /&gt;
== add dummy lua extension ==&lt;br /&gt;
* create the directory C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions&lt;br /&gt;
* create an empty file and save it as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions\readme.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Last changes : whoami and hostname =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami ==&lt;br /&gt;
Create a new file containing the single line:&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;username&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension)&lt;br /&gt;
&lt;br /&gt;
== Hostname ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows:&lt;br /&gt;
* open C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\configure.ac&lt;br /&gt;
* goto line 4728&lt;br /&gt;
* change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned&lt;br /&gt;
&lt;br /&gt;
== Bootstrap ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile ==&lt;br /&gt;
&lt;br /&gt;
Note : If Your &amp;lt;username&amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;lt;username&amp;gt;\config.h and double all backslashes in COMPILED_BY constant&lt;br /&gt;
&lt;br /&gt;
 ./compile&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands:&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file).&lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
* It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&lt;br /&gt;
* Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change&lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16279</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16279"/>
		<updated>2010-06-13T08:19:32Z</updated>

		<summary type="html">&lt;p&gt;Vicne: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required (who would want to build VLC without having command-line experience ?). Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
This version is mainly an update by Vicne of the original howto by [[User:J-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
==On the edge vs Conservative==&lt;br /&gt;
This update aims at building version 1.1.0rc (latest official build at time of writing) natively in the most straightforward way.&lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot; :-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
Thanks go to J-b, gnosygnu and MichaelMc&lt;br /&gt;
&lt;br /&gt;
= Windows tools needed =&lt;br /&gt;
== Text editor ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor.&lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether.&lt;br /&gt;
You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility ==&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised.&lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
== Browser == &lt;br /&gt;
// TODO - is Firefox really needed ?&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox]&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system.&lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;lt;username&amp;gt;&amp;quot;. Replace it appropriately where needed of course.&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : The steps advised below use a modified version of MinGW. If you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039;&lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download&lt;br /&gt;
&lt;br /&gt;
Go through the wizard:&lt;br /&gt;
* unckeck &amp;quot;Check for updated files...&amp;quot;&lt;br /&gt;
* Select &amp;quot;Create&amp;quot;&lt;br /&gt;
* install to C:\MinGW&lt;br /&gt;
* keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils ===&lt;br /&gt;
&lt;br /&gt;
TODO - Is this step needed ?&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz&lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys == &lt;br /&gt;
=== MSys Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0&lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows:&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed? :   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit ===&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe&lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values&lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0:&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0:&lt;br /&gt;
&lt;br /&gt;
* http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip&lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat:&lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read :&lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]).&lt;br /&gt;
Unfortunately, no binaries are provided so you need to compile them.&lt;br /&gt;
&lt;br /&gt;
* Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz&lt;br /&gt;
* Uncompress it in your home folder (C:\MSys\1.0\home\&amp;lt;username&amp;gt;)&lt;br /&gt;
* run C:\MSys\1.0\msys.bat&lt;br /&gt;
* type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands:&lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : Alternatively, you can get the latest contrib from :http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : This section lists the steps for VLC version 1.1.0rc. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks and will avoid the need for multiple manipulations described here. If you want chose that route, please follow instructions on the [[Git_Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc ==&lt;br /&gt;
&lt;br /&gt;
* download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc/vlc-1.1.0-rc.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0\home\&amp;lt;username&amp;gt;&lt;br /&gt;
* rename the vlc-1.1.0rc dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
== add missing vlc_windows_interfaces.h ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc/vlc-1.1.git;a=blob_plain;f=include/vlc_windows_interfaces.h;h=36bfd4a64b1ec9b9b5da0e21de6d93f53f2eefc3;hb=3a4b30fcf1fbb9ef7a9c85a102183f8a3451622a&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\include\vlc_windows_interfaces.h&lt;br /&gt;
&lt;br /&gt;
== duplicate missing position.h ==&lt;br /&gt;
&lt;br /&gt;
Duplicate the file as follows:&lt;br /&gt;
 source: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\mozilla\control\position.h&lt;br /&gt;
 target: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\activex\position.h&lt;br /&gt;
&lt;br /&gt;
== add dummy lua extension ==&lt;br /&gt;
* create the directory C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions&lt;br /&gt;
* create an empty file and save it as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions\readme.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Last changes : whoami and hostname =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami ==&lt;br /&gt;
Create a new file containing the single line:&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;username&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension)&lt;br /&gt;
&lt;br /&gt;
== Hostname ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows:&lt;br /&gt;
* open C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\configure.ac&lt;br /&gt;
* goto line 4728&lt;br /&gt;
* change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned&lt;br /&gt;
&lt;br /&gt;
== Bootstrap ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile ==&lt;br /&gt;
&lt;br /&gt;
Note : If Your &amp;lt;username&amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;lt;username&amp;gt;\config.h and double all backslashes in COMPILED_BY constant&lt;br /&gt;
&lt;br /&gt;
 ./compile&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands:&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file).&lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
* It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&lt;br /&gt;
* Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change&lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16278</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16278"/>
		<updated>2010-06-13T08:18:33Z</updated>

		<summary type="html">&lt;p&gt;Vicne: Complete rework by Vince, replacing JB&amp;#039;s original with his blessing - http://forum.videolan.org/viewtopic.php?f=32&amp;amp;t=76483&amp;amp;p=255461#p255466&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required (who would want to build VLC without having command-line experience ?). Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
This version is mainly an update by Vicne of the original howto by [[User:J-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
==On the edge vs Conservative==&lt;br /&gt;
This update aims at building version 1.1.0rc (latest official build at time of writing) natively in the most straightforward way.&lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot; :-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
Thanks go to J-b, gnosygnu and MichaelMc&lt;br /&gt;
&lt;br /&gt;
= Windows tools needed =&lt;br /&gt;
== Text editor ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor.&lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad altogether.&lt;br /&gt;
You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility ==&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised.&lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
== Browser == &lt;br /&gt;
// TODO - is Firefox really needed ?&lt;br /&gt;
&lt;br /&gt;
Please install [http://www.getfirefox.com Mozilla Firefox]&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system.&lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;lt;username&amp;gt;&amp;quot;. Replace it appropriately where needed of course.&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : The steps advised below use a modified version of MinGW. Is you feel like staying with the vanilla MinGW intead, use the main installer 5.1.6 found at http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download , then go through the wizard:&lt;br /&gt;
:&#039;&#039;* select &amp;quot;Downloading and Install&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select candidate release&#039;&#039;&lt;br /&gt;
:&#039;&#039;* select g++ and MinGW Make (in addition to the base system)&#039;&#039;&lt;br /&gt;
:&#039;&#039;Then, update Mingw GCC to 4.4.0 by downloading http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download and extracting it to C:\Mingw (replacing files when asked). Finally, you&#039;ll gave to fix the file C:\MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la by opening it and changing the line defining library_names so that it reads &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download&lt;br /&gt;
&lt;br /&gt;
Go through the wizard:&lt;br /&gt;
* unckeck &amp;quot;Check for updated files...&amp;quot;&lt;br /&gt;
* Select &amp;quot;Create&amp;quot;&lt;br /&gt;
* install to C:\MinGW&lt;br /&gt;
* keep default settings (i.e. under the gcc node, &amp;quot;TDM Unstable: 4.4.1-tdm-2&amp;quot; should be selected)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils ===&lt;br /&gt;
&lt;br /&gt;
TODO - Is this step needed ?&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz&lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys == &lt;br /&gt;
=== MSys Setup ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0&lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows:&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed? :   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit ===&lt;br /&gt;
Use the installer found at &lt;br /&gt;
http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe&lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values&lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0:&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0:&lt;br /&gt;
&lt;br /&gt;
* http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip&lt;br /&gt;
* ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the top of C:\MSys\msys.bat:&lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read :&lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]).&lt;br /&gt;
Unfortunately, no binaries are provided so you need to compile them.&lt;br /&gt;
&lt;br /&gt;
* Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz&lt;br /&gt;
* Uncompress it in your home folder (C:\MSys\1.0\home\&amp;lt;username&amp;gt;)&lt;br /&gt;
* run C:\MSys\1.0\msys.bat&lt;br /&gt;
* type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd ~/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands:&lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe /bin&lt;br /&gt;
 cp *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : Alternatively, you can get the latest contrib from :http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
= VLC sources =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : This section lists the steps for VLC version 1.1.0rc. Alternatively, you can get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks and will avoid the need for multiple manipulations described here. If you want chose that route, please follow instructions on the [[Git_Windows]] page then skip to next section.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc ==&lt;br /&gt;
&lt;br /&gt;
* download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc/vlc-1.1.0-rc.tar.bz2&lt;br /&gt;
* extract it to C:\MSys\1.0\home\&amp;lt;username&amp;gt;&lt;br /&gt;
* rename the vlc-1.1.0rc dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
== add missing vlc_windows_interfaces.h ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc/vlc-1.1.git;a=blob_plain;f=include/vlc_windows_interfaces.h;h=36bfd4a64b1ec9b9b5da0e21de6d93f53f2eefc3;hb=3a4b30fcf1fbb9ef7a9c85a102183f8a3451622a&lt;br /&gt;
* Save it (not using proposed name) as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\include\vlc_windows_interfaces.h&lt;br /&gt;
&lt;br /&gt;
== duplicate missing position.h ==&lt;br /&gt;
&lt;br /&gt;
Duplicate the file as follows:&lt;br /&gt;
 source: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\mozilla\control\position.h&lt;br /&gt;
 target: C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\projects\activex\position.h&lt;br /&gt;
&lt;br /&gt;
== add dummy lua extension ==&lt;br /&gt;
* create the directory C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions&lt;br /&gt;
* create an empty file and save it as C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\share\lua\extensions\readme.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Last changes : whoami and hostname =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave : the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by extracting who.exe, whoami.exe and hostname.exe from http://sourceforge.net/projects/mingw/files/MSYS/coreutils/coreutils-5.97-2/coreutils-5.97-2-msys-1.0.11-ext.tar.lzma/download and saving them to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami ==&lt;br /&gt;
Create a new file containing the single line:&lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;lt;username&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension)&lt;br /&gt;
&lt;br /&gt;
== Hostname ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows:&lt;br /&gt;
* open C:\MSys\1.0\home\&amp;lt;username&amp;gt;\vlc\configure.ac&lt;br /&gt;
* goto line 4728&lt;br /&gt;
* change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned&lt;br /&gt;
&lt;br /&gt;
== Bootstrap ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== Compile ==&lt;br /&gt;
&lt;br /&gt;
Note : If Your &amp;lt;username&amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;lt;username&amp;gt;\config.h and double all backslashes in COMPILED_BY constant&lt;br /&gt;
&lt;br /&gt;
 ./compile&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands:&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file).&lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
* It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&lt;br /&gt;
* Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change&lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If compile complains about a config.h and pthread.h not found problem, just delete config.h&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16218</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=16218"/>
		<updated>2010-06-03T18:22:24Z</updated>

		<summary type="html">&lt;p&gt;Vicne: Fixed broken links to GCC 4.4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
MSYS is a helper environment for MinGW, the compiler chain for Windows based on GCC. It is the fastest way to build VLC natively on Windows.&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010&lt;br /&gt;
&lt;br /&gt;
== Text editor ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor.&lt;br /&gt;
&lt;br /&gt;
For those wishing to have a Notepad look-and-feel I recommend [http://sourceforge.net/projects/notepad2/ notepad2], which may tempt you to ditch Notepad alltogether.&lt;br /&gt;
You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
== Install MinGW ==&lt;br /&gt;
&lt;br /&gt;
Use the main installer 5.1.6 found at&lt;br /&gt;
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download&lt;br /&gt;
&lt;br /&gt;
Go through the wizard:&lt;br /&gt;
* select &amp;quot;Downloading and Install&amp;quot;&lt;br /&gt;
* select candidate release&lt;br /&gt;
* select g++ and MinGW Make (in addition to the base system)&lt;br /&gt;
&lt;br /&gt;
It will download (from http://prdownloads.sourceforge.net/mingw) and install (based on mingw.ini file Build 12):&lt;br /&gt;
* mingwrt-3.17-mingw32-dev.tar.gz&lt;br /&gt;
* mingwrt-3.17-mingw32-dll.tar.gz&lt;br /&gt;
* w32api-3.14-mingw32-dev.tar.gz&lt;br /&gt;
* binutils-2.18.50-20080109-2.tar.gz&lt;br /&gt;
* gcc-core-3.4.5-20060117-3.tar.gz&lt;br /&gt;
* gcc-g++-3.4.5-20060117-3.tar.gz&lt;br /&gt;
* mingw32-make-3.81-2.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Update Mingw GCC to 4.4.0 ===&lt;br /&gt;
&lt;br /&gt;
Use GCC 4.4.0, with&lt;br /&gt;
http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download&lt;br /&gt;
&lt;br /&gt;
Extract it to C:\Mingw and make it replace the current files (you can use 7-zip to extract the files).&lt;br /&gt;
&lt;br /&gt;
* Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) due to bug in latest MinGW.&lt;br /&gt;
&lt;br /&gt;
It also needs&lt;br /&gt;
http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-core-4.4.0-mingw32-dll.tar.gz/download&lt;br /&gt;
to be installed otherwise there are warnings about a libgcc_s_dw2-1.dll missing when it comes to compiling the qt4 interface.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;ALTERNATIVE&#039;&#039; for above installation: Install TDM MinGW 4.4.1 ===&lt;br /&gt;
&lt;br /&gt;
The above setup may produce build errors like &amp;quot;undefined reference to `__Unwind_SjLj_Register&#039;&amp;quot; when compiling vlc.&lt;br /&gt;
That is because the above 4.4.0 build uses DW2(Dwarf-2) unwinding. &lt;br /&gt;
&lt;br /&gt;
You need a MinGW build of SJLJ unwinding.&lt;br /&gt;
&lt;br /&gt;
An easy installer is offered on [http://www.tdragon.net/recentgcc/ Twilight Dragon Media]: (Thanks to [[User:MichaelMc|MichaelMc]])&lt;br /&gt;
* http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download&lt;br /&gt;
&lt;br /&gt;
* Use text editor to change MinGW\lib\gcc\mingw32\4.4.1\libstdc++.la file (line should be &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;library_names=&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;) due to bug in latest MinGW.&lt;br /&gt;
&lt;br /&gt;
It also needs&lt;br /&gt;
http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-core-4.4.0-mingw32-dll.tar.gz/download&lt;br /&gt;
to be installed otherwise there are warnings about a libgcc_s_dw2-1.dll missing when it comes to compiling the qt4 interface.&lt;br /&gt;
&lt;br /&gt;
== Install MSYS ==&lt;br /&gt;
&lt;br /&gt;
* Install 7-zip and Mozilla Firefox&lt;br /&gt;
* Install MSys 1.0.11-rc1 with the exe: http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;filename=MSYS-1.0.11.exe to default C:\Msys\1.0 folder&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed? :   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
* Install MSys Developer Tooltkit: http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe&lt;br /&gt;
&lt;br /&gt;
=== AutoTools in MSYS ===&lt;br /&gt;
&lt;br /&gt;
Update your autoconf, automake and libtool by downloading and installing them, keeping in mind that you need to extract the content to C:\Msys\1.0&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20autoconf/autoconf-2.63-1/autoconf-2.63-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20automake/automake-1.11-1/automake-1.11-1-msys-1.0.11-bin.tar.lzma/download &lt;br /&gt;
* http://sourceforge.net/projects/mingw/files/MSYS%20libtool/libtool-2.2.7a-1/libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma/download&lt;br /&gt;
&lt;br /&gt;
You can also compile them according to:&lt;br /&gt;
* http://trac.enlightenment.org/e/wiki/EFLWindowsXP (was: http://wiki.enlightenment.org/index.php/EFL_Windows_XP)&lt;br /&gt;
* http://www.mingw.org/wiki/msys&lt;br /&gt;
&lt;br /&gt;
==== Patch libtools ====&lt;br /&gt;
&lt;br /&gt;
If you installed the TDM MinGW 4.4.1, you may also need to patch the downloaded libtools file in your msys after installing, because it is hardcoded for the 4.4.0 version of MinGW: &lt;br /&gt;
* Use text editor to open /bin/libtools and find &amp;quot;compiler_lib_search_dirs&amp;quot; (lines 10244 to 10255) and change ALL &amp;quot;mingw32/4.4.0&amp;quot; instances to &amp;quot;mingw32/4.4.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Add a personal touch to your own build of vlc ====&lt;br /&gt;
&lt;br /&gt;
This one isn&#039;t necessary to build vlc, but it adds a personal touch.&lt;br /&gt;
&lt;br /&gt;
No &#039;compiled by&#039; name will appear in vlc&#039;s about box when you run it. This is because msys lacks a &#039;whoami&#039; command. &lt;br /&gt;
&lt;br /&gt;
Use your text editor to create a new file and enter a single line of text:&lt;br /&gt;
&lt;br /&gt;
 echo &#039;insert your name here&#039;&lt;br /&gt;
&lt;br /&gt;
Save it as &#039;whoami&#039; in C:\msys\1.0\bin . Type &#039;whoami&#039; in the console: It now returns your name.&lt;br /&gt;
&lt;br /&gt;
=== Install libgcrypt in MSys ===&lt;br /&gt;
&lt;br /&gt;
http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
&lt;br /&gt;
=== Install other tools in Mingw ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz, extract it to mingw/bin.&lt;br /&gt;
&lt;br /&gt;
Installation of wget too: http://prdownloads.sourceforge.net/mingw/wget-1.9.1-mingwPORT.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Although this is a mingwPORT package it already has a precompiled wget on board.&lt;br /&gt;
Extract the .tar.bz2 file. It contains wget.exe in the bin subfolder, extract it to mingw/bin.&lt;br /&gt;
&lt;br /&gt;
=== PKG-CONFIG ===&lt;br /&gt;
&lt;br /&gt;
pkg-config is a mess, this is not NEWS... And you cannot compile it from Windows because of a few bugs...&lt;br /&gt;
&lt;br /&gt;
Get Glib from GNOME: http://ftp.gnome.org/pub/GNOME/binaries/win32/glib/2.18/glib_2.18.2-1_win32.zip &lt;br /&gt;
Unzip it to C:\Msys\1.0 .&lt;br /&gt;
&lt;br /&gt;
Get PKG-CONFIG from GNOME: ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip&lt;br /&gt;
and ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
Unzip them to C:\Msys\1.0 .&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
(e.g. by adding the Windows enviroment variable PKG_CONFIG_PATH in &amp;quot;Control Panel&amp;quot;-&amp;gt;&amp;quot;System&amp;quot;-&amp;gt;&amp;quot;Advanced System Settings&amp;quot;-&amp;gt;&amp;quot;Environment Variables&amp;quot; and setting the value to /win32/lib/pkgconfig)&lt;br /&gt;
&lt;br /&gt;
--- (SJW 12/5/2010)&lt;br /&gt;
&lt;br /&gt;
== Install LUA tools ==&lt;br /&gt;
&lt;br /&gt;
vlc uses the LUA scripting language (See [http://www.lua.org lua.org]).&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have a lua.exe and luac.exe: &lt;br /&gt;
* Download the lua tools from http://www.lua.org/ftp/lua-5.1.4.tar.gz&lt;br /&gt;
Untar it in your home folder.&lt;br /&gt;
There are no binaries supplied, so you need to compile this:&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/lua-5.1.4 &lt;br /&gt;
 $ make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin&lt;br /&gt;
&lt;br /&gt;
 $ cd src &lt;br /&gt;
 $ cp *.exe /bin&lt;br /&gt;
 $ cp *.dll /bin&lt;br /&gt;
&lt;br /&gt;
--[[User:Belbear|Belbear]] 12:58, 7 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Install Git and checkout VLC ==&lt;br /&gt;
&lt;br /&gt;
See [[Git_Windows]].&lt;br /&gt;
&lt;br /&gt;
You can also retrieve the source code from [http://www.videolan.org/vlc/download-sources.html VideoLAN Project: VLC media player source code]&lt;br /&gt;
&lt;br /&gt;
== Contribs ==&lt;br /&gt;
&lt;br /&gt;
Take the precompiled contribs from:&lt;br /&gt;
 http://people.videolan.org/~jb/Contribs/&lt;br /&gt;
&lt;br /&gt;
Copy them in your ~&lt;br /&gt;
 tar xvjf contrib-20090813-win32-bin-gcc-4.2.1-sjlj-runtime-3.15.2-only.tar.bz2 -C /&lt;br /&gt;
 rm -v /usr/win32/bin/moc /usr/win32/bin/uic /usr/win32/bin/rcc&lt;br /&gt;
&lt;br /&gt;
rm isn&#039;t needed with some contrib packages, because they don&#039;t contain those files.&lt;br /&gt;
&lt;br /&gt;
== Bootstrap VLC ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
It should warn about gettext... Just ignore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
* If you downloaded a VLC source code tarball, retrieve &#039;&#039;configure-msys.sh&#039;&#039; and &#039;&#039;configure-common.sh&#039;&#039; from [[http://git.videolan.org/?p=vlc.git;a=summary vlc.git]] / extras / package / win32 /&lt;br /&gt;
* If Your user name starts from &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; characters, change config.h (double all backslashes in COMPILED_BY constant to avoid compilation errors) after configuring.&lt;br /&gt;
&lt;br /&gt;
== Compile ==&lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH make&lt;br /&gt;
If you have Cygwin and others tools installed, try using a shorter PATH inside MSYS shell i.e.&lt;br /&gt;
 $ echo $PATH&lt;br /&gt;
 .:/usr/local/bin:/mingw/bin:/bin&lt;br /&gt;
&lt;br /&gt;
==Creating self-contained packages==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with the following &amp;quot;make&amp;quot; commands:&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file).&lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
* If you have permissions problems running make package-*, chmod 777 -R the vlc folder.&lt;br /&gt;
* If you have permissions problems running vlc.exe after packaging, rename or delete vlc.exe.manifest&lt;br /&gt;
&lt;br /&gt;
== Random bootstrap, configure, and make errors ==&lt;br /&gt;
&lt;br /&gt;
There have been reports of random msys errors during bootstrap, configure, and make. They usually don&#039;t repeat themselves between runs. Rule out that your mingw-msys installation is at fault by building in windows safe mode. Even if this works, it may then be more practical to try a cross-compilation build.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* It doesn&#039;t link, and complains about missing gcc symbols: You missed this line in the instructions:&lt;br /&gt;
Use text editor to change MinGW\lib\gcc\mingw32\4.4.0\libstdc++.la file (line should be library_names=&#039;&#039;) due to bug in latest MinGW.&lt;br /&gt;
* Compilation stops early, after configure was complaining about mismatched quotes:&lt;br /&gt;
Check the VLC_COMPILE_HOST variable in your config.h - if it&#039;s &#039;&#039;Option f is not valid&#039;&#039; then &#039;&#039;hostname -f&#039;&#039; fails (on Windows, there is no such option as -f). In configure.ac change&lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vicne</name></author>
	</entry>
</feed>