<?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=Andares</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=Andares"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Andares/"/>
	<updated>2026-11-04T20:40:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=23051</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=23051"/>
		<updated>2012-08-24T17:08:44Z</updated>

		<summary type="html">&lt;p&gt;Andares: Added link to mingw32-runtime-3.17 for Debian users (j-b&amp;#039;s package)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cross-compile with Mingw on Linux&#039;&#039;&#039; &lt;br /&gt;
| This page &lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileMSYSNew]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Native compilation&#039;&#039;&#039; with &#039;&#039;&#039;cygwin&#039;&#039;&#039; &lt;br /&gt;
| [[Win32CompileCygwinNew]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Obtaining the toolchain  ==&lt;br /&gt;
&lt;br /&gt;
=== Compiler and binary toolchain ===&lt;br /&gt;
&lt;br /&gt;
To compile VLC for Windows (32-bits or 64-bits), the Mingw-w64 toolchain is required:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039;: run &amp;lt;code&amp;gt;apt-get install gcc-mingw-w64-i686&amp;lt;/code&amp;gt;&lt;br /&gt;
(on Debian you must be on wheezy or above to find this package)&lt;br /&gt;
&lt;br /&gt;
Up to versions 2.0.x, VLC was compiled with the older mingw32 toolchain, which only supports 32-bits Windows. If you have problems with mingw-w64, you can try mingw32 instead:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039;: run &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;. Note that at least version 3.17 of Mingw32 is required, which Debian does not provide. You may obtain mingw32-runtime-3.17 [http://people.videolan.org/~jb/debian/mingw32-runtime_3.17.0-0videolan_all.deb here].&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32Compile Under Fedora]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.mingw.org MSYS+MINGW]&#039;&#039;&#039;, should read the [[Win32CompileMSYSNew|documentation]]&lt;br /&gt;
* Native-compile with &#039;&#039;&#039;[http://www.cygwin.com Cygwin]&#039;&#039;&#039;, should read the [[Win32CompileCygwinNew|documentation]]&lt;br /&gt;
&lt;br /&gt;
=== Development tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua5.1&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer], bzip2 [for &#039;make prebuild]&lt;br /&gt;
&lt;br /&gt;
=== Host triplet ===&lt;br /&gt;
A number of example commands below include the identifier of the toolchain. This value is &#039;&#039;&#039;essential&#039;&#039;&#039;: it instructs the build system to use the correct toolchain and compile the program for Windows. Without the value, the build system will perform a native compilation for Linux (or whatever your computer runs). With an incorrect value, the build will fail.&lt;br /&gt;
&lt;br /&gt;
This is known as the &#039;&#039;host triplet&#039;&#039;, although it&#039;s more of a pair than a triplet in the case of Mingw. The exact value depends on your installation of the toolchain. Notably on Debian/Ubuntu, these values must be used:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;i686-w64-mingw32&#039;&#039; for Windows 32-bits, using the Mingw-w64 toolchain&lt;br /&gt;
* &#039;&#039;x86_64-w64-mingw32&#039;&#039; for Windows 64-bits, using the Mingw-w64 toolchain&lt;br /&gt;
* &#039;&#039;i586-mingw32msvc&#039;&#039; for Windows 32-bits, using the Mingw32 toolchain&lt;br /&gt;
&lt;br /&gt;
Again, you &#039;&#039;&#039;MUST&#039;&#039;&#039; substitute the value in the following command snippets.&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git vlc&lt;br /&gt;
&lt;br /&gt;
== Go into the VLC directory ==&lt;br /&gt;
 $ cd vlc&lt;br /&gt;
&lt;br /&gt;
== Prepare [[Contrib Status|3rd party libraries]]  ==&lt;br /&gt;
&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
  # apt-get install subversion yasm cvs cmake&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i586-mingw32msvc&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;SHOULD&#039;&#039;&#039; remove some files, or install the lib32 packages (ia32-libs, multilibs, etc...)&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i586-mingw32msvc/bin/moc ../i586-mingw32msvc/bin/uic ../i586-mingw32msvc/bin/rcc&lt;br /&gt;
&lt;br /&gt;
In addition, install the &#039;&#039;qt4-tools&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i586-mingw32msvc&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i586-mingw32msvc ../i486-mingw32&lt;br /&gt;
&lt;br /&gt;
=== Go Back  ===&lt;br /&gt;
&lt;br /&gt;
Go back to the VLC source directory: &lt;br /&gt;
&lt;br /&gt;
  $ cd -&lt;br /&gt;
&lt;br /&gt;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i586-mingw32msvc&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; Xcompiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i586-mingw32msvc&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt; (might be package-win32-strip)&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>Andares</name></author>
	</entry>
</feed>