<?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=Global667</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=Global667"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Global667/"/>
	<updated>2026-11-04T17:14:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15147</id>
		<title>VLCKit</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15147"/>
		<updated>2009-12-20T18:05:23Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Sample code */ correcting 2nd path, make more readable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
=== Build the framework === &lt;br /&gt;
&lt;br /&gt;
* open &amp;lt;code&amp;gt;./vlc/projects/macosx/framework/VLCKit.xcodeproj&amp;lt;/code&amp;gt; &lt;br /&gt;
* make sure the VLCKit target is selected &lt;br /&gt;
* rightclick on target and build&lt;br /&gt;
&lt;br /&gt;
this should autatically build vlc itself at the same time in projects/macosx/framework/build/vlc_build_dir&lt;br /&gt;
== Basic usage in your application ==&lt;br /&gt;
The code should speak by itself&lt;br /&gt;
   // Set up a videoView by hand. You can also do that in the nib file&lt;br /&gt;
    videoView = [[VLCVideoView alloc] initWithFrame:[[window contentView] bounds]];&lt;br /&gt;
    [[window contentView] addSubview:videoView];&lt;br /&gt;
    [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];&lt;br /&gt;
   &lt;br /&gt;
    // Init the player object&lt;br /&gt;
    player = [[VLCMediaPlayer alloc] initWithVideoView:videoView];&lt;br /&gt;
  &lt;br /&gt;
    [player setMedia:[VLCMedia mediaWithPath:@&amp;quot;/to/my/movie&amp;quot;]];&lt;br /&gt;
    [player play];&lt;br /&gt;
&lt;br /&gt;
== Sample code ==&lt;br /&gt;
You should be able to find sample code in:&lt;br /&gt;
* &amp;lt;code&amp;gt; ./vlc/projects/macosx/framework/Examples &amp;lt;/code&amp;gt;: This is the folder that contains the VLC.framework basics usage.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; ./vlc/projects/macosx/vlc_app &amp;lt;/code&amp;gt;: This is the VLC application that uses the framework intensivly, this is much more advanced.&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15145</id>
		<title>VLCKit</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15145"/>
		<updated>2009-12-20T16:45:49Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Build the framework */ debug :(&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to build the framework ==&lt;br /&gt;
&lt;br /&gt;
Follow the quicksteps for your system on the [[OSXCompile | Building on Mac OS X]] page to build VLC.&lt;br /&gt;
&lt;br /&gt;
If the second make fails, giving you an error like:&lt;br /&gt;
&lt;br /&gt;
    ld warning: in ///Users/username/dev/vlc/extras/contrib/lib/libx264.a, file is not of required architecture&lt;br /&gt;
    Undefined symbols:&lt;br /&gt;
       &amp;quot;_x264_encoder_close&amp;quot;, referenced from:&lt;br /&gt;
       _Close in libx264_plugin_la-x264.o&lt;br /&gt;
    etc...&lt;br /&gt;
&lt;br /&gt;
then download and build x264. Then copy libx264.a into vlc/extras/contrib/lib/&lt;br /&gt;
&lt;br /&gt;
=== To build on Snow Leopard with 32-bit ===&lt;br /&gt;
On 10.6 64-bit compiling is default and also recommended (see [[OSXCompile | Building on Mac OS X]]). To build with 32-bit you need to set the environment as followed and use the 10.5 Quicksteps instead of the 10.6 one:&lt;br /&gt;
&lt;br /&gt;
 $ [...]&lt;br /&gt;
 $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
 $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
 $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
 $ export CFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export CXXFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export OBJCFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export LDFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
 $ [...]&lt;br /&gt;
&lt;br /&gt;
=== Build the framework === &lt;br /&gt;
&lt;br /&gt;
* open &amp;lt;code&amp;gt;./vlc/projects/macosx/framework/VLCKit.xcodeproj&amp;lt;/code&amp;gt; &lt;br /&gt;
* make sure the VLCKit target is selected &lt;br /&gt;
* rightclick on target and build&lt;br /&gt;
&lt;br /&gt;
== Basic usage in your application ==&lt;br /&gt;
The code should speak by itself&lt;br /&gt;
   // Set up a videoView by hand. You can also do that in the nib file&lt;br /&gt;
    videoView = [[VLCVideoView alloc] initWithFrame:[[window contentView] bounds]];&lt;br /&gt;
    [[window contentView] addSubview:videoView];&lt;br /&gt;
    [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];&lt;br /&gt;
   &lt;br /&gt;
    // Init the player object&lt;br /&gt;
    player = [[VLCMediaPlayer alloc] initWithVideoView:videoView];&lt;br /&gt;
  &lt;br /&gt;
    [player setMedia:[VLCMedia mediaWithPath:@&amp;quot;/to/my/movie&amp;quot;]];&lt;br /&gt;
    [player play];&lt;br /&gt;
&lt;br /&gt;
== Sample code ==&lt;br /&gt;
You should be able to find sample code in:&lt;br /&gt;
* Framework/Examples: This is the folder that contains the VLC.framework basics usage.&lt;br /&gt;
&lt;br /&gt;
* vlc-trunk/extras/MacOSX/VLC_app: This is the VLC application that uses the framework intensivly, this is much more advanced.&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15144</id>
		<title>VLCKit</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15144"/>
		<updated>2009-12-20T16:35:08Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* To build on Snow Leopard with 32-bit */  addition to snow leo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to build the framework ==&lt;br /&gt;
&lt;br /&gt;
Follow the quicksteps for your system on the [[OSXCompile | Building on Mac OS X]] page to build VLC.&lt;br /&gt;
&lt;br /&gt;
If the second make fails, giving you an error like:&lt;br /&gt;
&lt;br /&gt;
    ld warning: in ///Users/username/dev/vlc/extras/contrib/lib/libx264.a, file is not of required architecture&lt;br /&gt;
    Undefined symbols:&lt;br /&gt;
       &amp;quot;_x264_encoder_close&amp;quot;, referenced from:&lt;br /&gt;
       _Close in libx264_plugin_la-x264.o&lt;br /&gt;
    etc...&lt;br /&gt;
&lt;br /&gt;
then download and build x264. Then copy libx264.a into vlc/extras/contrib/lib/&lt;br /&gt;
&lt;br /&gt;
=== To build on Snow Leopard with 32-bit ===&lt;br /&gt;
On 10.6 64-bit compiling is default and also recommended (see [[OSXCompile | Building on Mac OS X]]). To build with 32-bit you need to set the environment as followed and use the 10.5 Quicksteps instead of the 10.6 one:&lt;br /&gt;
&lt;br /&gt;
 $ [...]&lt;br /&gt;
 $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
 $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
 $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
 $ export CFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export CXXFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export OBJCFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export LDFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
 $ [...]&lt;br /&gt;
&lt;br /&gt;
=== Build the framework === &lt;br /&gt;
&lt;br /&gt;
* open &amp;lt;code&amp;gt;./vlc/extras/package/macosx/VLCKit.xcodeproj&amp;lt;/code&amp;gt; &lt;br /&gt;
* make sure the VLCKit target is selected &lt;br /&gt;
* rightclick on target and build&lt;br /&gt;
&lt;br /&gt;
== Basic usage in your application ==&lt;br /&gt;
The code should speak by itself&lt;br /&gt;
   // Set up a videoView by hand. You can also do that in the nib file&lt;br /&gt;
    videoView = [[VLCVideoView alloc] initWithFrame:[[window contentView] bounds]];&lt;br /&gt;
    [[window contentView] addSubview:videoView];&lt;br /&gt;
    [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];&lt;br /&gt;
   &lt;br /&gt;
    // Init the player object&lt;br /&gt;
    player = [[VLCMediaPlayer alloc] initWithVideoView:videoView];&lt;br /&gt;
  &lt;br /&gt;
    [player setMedia:[VLCMedia mediaWithPath:@&amp;quot;/to/my/movie&amp;quot;]];&lt;br /&gt;
    [player play];&lt;br /&gt;
&lt;br /&gt;
== Sample code ==&lt;br /&gt;
You should be able to find sample code in:&lt;br /&gt;
* Framework/Examples: This is the folder that contains the VLC.framework basics usage.&lt;br /&gt;
&lt;br /&gt;
* vlc-trunk/extras/MacOSX/VLC_app: This is the VLC application that uses the framework intensivly, this is much more advanced.&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Talk:VLCKit&amp;diff=15143</id>
		<title>Talk:VLCKit</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Talk:VLCKit&amp;diff=15143"/>
		<updated>2009-12-20T16:30:42Z</updated>

		<summary type="html">&lt;p&gt;Global667: Created page with &amp;#039;== Sync with OSXCompile ==  OSXCompile and Mac_OS_X_Framework are redundant in some aspects. For better care I linked it together (only one build howto is to care off)  a...&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sync with OSXCompile ==&lt;br /&gt;
&lt;br /&gt;
[[OSXCompile]] and [[Mac_OS_X_Framework]] are redundant in some aspects. For better care I linked it together (only one build howto is to care off)  and added some news.&lt;br /&gt;
&lt;br /&gt;
--[[User:Global667|Global667]] 16:30, 20 December 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15142</id>
		<title>VLCKit</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=VLCKit&amp;diff=15142"/>
		<updated>2009-12-20T16:26:36Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* How to build the framework */ See discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to build the framework ==&lt;br /&gt;
&lt;br /&gt;
Follow the quicksteps for your system on the [[OSXCompile | Building on Mac OS X]] page to build VLC.&lt;br /&gt;
&lt;br /&gt;
If the second make fails, giving you an error like:&lt;br /&gt;
&lt;br /&gt;
    ld warning: in ///Users/username/dev/vlc/extras/contrib/lib/libx264.a, file is not of required architecture&lt;br /&gt;
    Undefined symbols:&lt;br /&gt;
       &amp;quot;_x264_encoder_close&amp;quot;, referenced from:&lt;br /&gt;
       _Close in libx264_plugin_la-x264.o&lt;br /&gt;
    etc...&lt;br /&gt;
&lt;br /&gt;
then download and build x264. Then copy libx264.a into vlc/extras/contrib/lib/&lt;br /&gt;
&lt;br /&gt;
=== To build on Snow Leopard with 32-bit ===&lt;br /&gt;
On 10.6 64-bit compiling is default and also recommended (see [[OSXCompile | Building on Mac OS X]]). To build with 32-bit you need to set the environment as followed:&lt;br /&gt;
&lt;br /&gt;
 $ [...]&lt;br /&gt;
 $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
 $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
 $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
 $ export CFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export CXXFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export OBJCFLAGS=&amp;quot;-arch i386 -m32&amp;quot;&lt;br /&gt;
 $ export LDFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
 $ [...]&lt;br /&gt;
&lt;br /&gt;
=== Build the framework === &lt;br /&gt;
&lt;br /&gt;
* open &amp;lt;code&amp;gt;./vlc/extras/package/macosx/VLCKit.xcodeproj&amp;lt;/code&amp;gt; &lt;br /&gt;
* make sure the VLCKit target is selected &lt;br /&gt;
* rightclick on target and build&lt;br /&gt;
&lt;br /&gt;
== Basic usage in your application ==&lt;br /&gt;
The code should speak by itself&lt;br /&gt;
   // Set up a videoView by hand. You can also do that in the nib file&lt;br /&gt;
    videoView = [[VLCVideoView alloc] initWithFrame:[[window contentView] bounds]];&lt;br /&gt;
    [[window contentView] addSubview:videoView];&lt;br /&gt;
    [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];&lt;br /&gt;
   &lt;br /&gt;
    // Init the player object&lt;br /&gt;
    player = [[VLCMediaPlayer alloc] initWithVideoView:videoView];&lt;br /&gt;
  &lt;br /&gt;
    [player setMedia:[VLCMedia mediaWithPath:@&amp;quot;/to/my/movie&amp;quot;]];&lt;br /&gt;
    [player play];&lt;br /&gt;
&lt;br /&gt;
== Sample code ==&lt;br /&gt;
You should be able to find sample code in:&lt;br /&gt;
* Framework/Examples: This is the folder that contains the VLC.framework basics usage.&lt;br /&gt;
&lt;br /&gt;
* vlc-trunk/extras/MacOSX/VLC_app: This is the VLC application that uses the framework intensivly, this is much more advanced.&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Talk:MacOSCompile&amp;diff=15135</id>
		<title>Talk:MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Talk:MacOSCompile&amp;diff=15135"/>
		<updated>2009-12-20T13:32:33Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Proper way to initialize the environment */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(comments withdrawn)&lt;br /&gt;
&lt;br /&gt;
: First of all, this wiki isn&#039;t the correct place to discuss this kind of questions. vlc-devel at videolan is a far better place. Anyway, it&#039;s correct that you can use the 10.4u SDK as well. In fact, VLC obviously automatically does so on Intel-based Macs. Concerning your 2nd comment: no further tool beside the default installation to /usr/local is required to build VLC (excepting svn/subversion in rare cases). Any other 3rd party library, which would usually end up in that directory is built and installed inside VLC&#039;s code base, in extras/contrib to be precise. That&#039;s clearly stated on this HOWTO page. Please mail the mailing list mentioned above for further feedback. Additionally, when complaining about VLC in general or particularly documentation, keep in mind that we&#039;re doing this in our spare time and that we aren&#039;t required to answer your requests, especially when strangers to this project get demanding and impolite. [[User:Fkuehne|feepk]] 01:27, 1 February 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Change how the build intruction are shown --[[User:Pdherbemont|Pdherbemont]] 20:34, 31 May 2007 (CEST) == &lt;br /&gt;
I would suggest we put the build command in some form easier to read, like :&lt;br /&gt;
&lt;br /&gt;
* Build the third party libraries&lt;br /&gt;
  cd vlc/extras/contrib&lt;br /&gt;
  ./bootstrap&lt;br /&gt;
  make &lt;br /&gt;
* Now build vlc&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
(By the way, the current instruction to use make src doesn&#039;t work.  make alone is sufficient and necessary. --[[User:Chjones|Chjones]] 00:59, 18 June 2008 (CEST))&lt;br /&gt;
&lt;br /&gt;
== Please don&#039;t link to subversion --[[User:Pdherbemont|Pdherbemont]] 12:15, 2 May 2008 (CEST) == &lt;br /&gt;
&lt;br /&gt;
= Compiling VLC on Mac OS X (draft) =&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal compilation on Linux and Mac OS X. We do not use Xcode, nor a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;. Below you will find instructions for how to compile VLC on Mac OS X - remember to check the prerequisites before taking the plunge.&lt;br /&gt;
&lt;br /&gt;
If you wish to develop or test please join the vlc-devel mailinglist.&lt;br /&gt;
&lt;br /&gt;
Please do not publish any of the non-released test binaries or svn-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* Mac OS X 10.4.x (Tiger) or 10.5.x (Leopard)&lt;br /&gt;
* Xcode 2.4.x or Xcode 2.5&lt;br /&gt;
&lt;br /&gt;
Optional:&lt;br /&gt;
* Subversion&lt;br /&gt;
&lt;br /&gt;
Mac OS X 10.4 (Universal) SDK (a part of Xcode) is required to build the external libraries of VLC.&lt;br /&gt;
&lt;br /&gt;
Your GCC version should be set to 4 (the default setting).&lt;br /&gt;
&lt;br /&gt;
Xcode can be found online or on the Developer Tools disc, which accompanied Mac OS X.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If building {{VLC}} on Mac OS X 10.5 Leopard, be sure to read the paragraph on this specific version below, before proceeding.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X 10.5 Leopard ===&lt;br /&gt;
Note, that only VLC&#039;s current development trunk can be compiled on Mac OS X 10.5 Leopard. While the 0.8.6 series, when compiled on Tiger, works on Leopard (as expected), no current stable branch compiles on Mac OS X 10.5 Leopard.&lt;br /&gt;
&lt;br /&gt;
As widely published, this version of Mac OS X includes a new release of Xcode, called Xcode 3, which includes many cool new features, but unfortunately, it is incompatible with VLC. You need Xcode 2.5 to compile VLC on Leopard, which can easily be installed in addition to your Xcode 3 tools. However, you need to edit your PATH variable before doing anything with VLC&#039;s source. In case that you installed to to the default location (&amp;lt;code&amp;gt;/Xcode2.5&amp;lt;/code&amp;gt;) and you are using the default shell (&amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;), this is pretty simple:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;export PATH=/Xcode2.5/bin:/Xcode2.5/sbin:/Xcode2.5/usr/bin:/Xcode2.5/usr/sbin:$PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you need to repeat this PATH edit every time you relaunch the shell. You can avoid this by editing your bashrc file. Once Apple releases a fixed linker for Mac OS X Leopard, this work-around will not be necessary anymore and you can use Xcode 3 as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regarding Fink ===&lt;br /&gt;
If you have Fink installed, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] using [[subversion]] (as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page) or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
These instructions below are always for the currently unstable, non-released code.&lt;br /&gt;
&lt;br /&gt;
If you compile from [[Subversion]] then please remember that this code can often be in an unstable state. &lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* cd to the extras/contrib subdir of VLC and execute &amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
* Now execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;. This will download and compile all the required external libraries and programs. You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&#039;&#039;If bootstrap exits with an error message on Mac OS X Leopard, check the paragraph on this version above.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory. If you use Subversion (which you really should), then run &amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current trunk revisions, you can simply run &amp;lt;code&amp;gt;./configure --enable-debug --with-macosx-sdk&amp;lt;/code&amp;gt; to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &amp;lt;code&amp;gt;make VLC-release.app&amp;lt;/code&amp;gt; afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and Derk-Jan Hartman, for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]]. Edited by Jesper Stemann Andersen.&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;br /&gt;
&lt;br /&gt;
== regarding &amp;quot;How to disable Fink&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
On 10.5.6 with current fink I found the fink initialization in .profile as&lt;br /&gt;
&amp;lt;code&amp;gt;test -r /sw/bin/init.sh &amp;amp;&amp;amp; . /sw/bin/init.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggested new wording:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: &#039;&#039;&amp;lt;code&amp;gt;#source /sw/bin/init.csh&amp;lt;/code&amp;gt;&#039;&#039; in your .cshrc file or &#039;&#039;&amp;lt;code&amp;gt; . /sw/bin/init.csh&amp;lt;/code&amp;gt;&#039;&#039; in your .bashrc file or &#039;&#039;&amp;lt;code&amp;gt; test -r /sw/bin/init.sh &amp;amp;&amp;amp; . /sw/bin/init.sh&amp;lt;/code&amp;gt;&#039;&#039; in your .profile file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Proper way to initialize the environment ==&lt;br /&gt;
&lt;br /&gt;
On my point of view its not  a good idea to skip&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
export CFLAGS=&amp;quot;-arch *&amp;quot; &lt;br /&gt;
&lt;br /&gt;
export CXXFLAGS=&amp;quot;-arch *&amp;quot; &lt;br /&gt;
&lt;br /&gt;
export LDFLAGS=&amp;quot;-arch *&amp;quot; &lt;br /&gt;
&lt;br /&gt;
export OBJCFLAGS=&amp;quot;-arch *&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without, my system will get confused and secondary its the most proper way to initialize the environment.&lt;br /&gt;
&lt;br /&gt;
Greets&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15130</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15130"/>
		<updated>2009-12-20T13:03:52Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Prepare Mac OS X for build VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prepare Mac OS X for build VLC ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code. If you compile from [[Git]] then please remember that this code can often be in an unstable state so &#039;&#039;don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* If you wish to develop or test please join the [http://www.videolan.org/developers/lists.html  vlc-devel mailinglist ].&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; do this now:  http://developer.apple.com/technology/xcode.html &amp;lt;br&amp;gt;&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Git&#039;&#039;&#039; do this now: http://git-scm.com/&lt;br /&gt;
&lt;br /&gt;
== Quick Steps on Mac OS X.5 ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build VLC: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Add needed libs to VLC.app:&lt;br /&gt;
&lt;br /&gt;
 $ make VLC-release.app&lt;br /&gt;
&lt;br /&gt;
== Quick Steps on Mac OS X.6 ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch x86_64&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch x86_64&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap x86_64-apple-darwin10&lt;br /&gt;
  $ make -j2&lt;br /&gt;
 &lt;br /&gt;
Build VLC: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  --host=x86_64-apple-darwin10&lt;br /&gt;
  $ make -j2&lt;br /&gt;
&lt;br /&gt;
Add needed libs to VLC.app:&lt;br /&gt;
&lt;br /&gt;
 $ make VLC-release.app&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15128</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15128"/>
		<updated>2009-12-20T12:28:07Z</updated>

		<summary type="html">&lt;p&gt;Global667: Add 10.6 support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prepare Mac OS X for build VLC ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code. If you compile from [[Git]] then please remember that this code can often be in an unstable state so &#039;&#039;don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* If you wish to develop or test please join the [http://www.videolan.org/developers/lists.html  vlc-devel mailinglist ].&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; do this now:  http://developer.apple.com/technology/xcode.html &amp;lt;br&amp;gt;&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Git&#039;&#039;&#039; do this now: http://git-scm.com/&lt;br /&gt;
* Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&lt;br /&gt;
&lt;br /&gt;
== Quick Steps on Mac OS X.5 ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build VLC: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Add needed libs to VLC.app:&lt;br /&gt;
&lt;br /&gt;
 $ make VLC-release.app&lt;br /&gt;
&lt;br /&gt;
== Quick Steps on Mac OS X.6 ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch x86_64&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch x86_64&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap x86_64-apple-darwin10&lt;br /&gt;
  $ make -j2&lt;br /&gt;
 &lt;br /&gt;
Build VLC: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  --host=x86_64-apple-darwin10&lt;br /&gt;
  $ make -j2&lt;br /&gt;
&lt;br /&gt;
Add needed libs to VLC.app:&lt;br /&gt;
&lt;br /&gt;
 $ make VLC-release.app&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15127</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15127"/>
		<updated>2009-12-20T12:25:50Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Quick Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prepare Mac OS X for build VLC ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code. If you compile from [[Git]] then please remember that this code can often be in an unstable state so &#039;&#039;don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* If you wish to develop or test please join the [http://www.videolan.org/developers/lists.html  vlc-devel mailinglist ].&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; do this now:  http://developer.apple.com/technology/xcode.html &amp;lt;br&amp;gt;&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Git&#039;&#039;&#039; do this now: http://git-scm.com/&lt;br /&gt;
* Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&lt;br /&gt;
&lt;br /&gt;
== Quick Steps on Mac OS X.5 ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build VLC: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Add needed libs to VLC.app:&lt;br /&gt;
&lt;br /&gt;
 $ make VLC-release.app&lt;br /&gt;
&lt;br /&gt;
Read next section for more details.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15126</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15126"/>
		<updated>2009-12-20T10:57:14Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Quick Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prepare Mac OS X for build VLC ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code. If you compile from [[Git]] then please remember that this code can often be in an unstable state so &#039;&#039;don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* If you wish to develop or test please join the [http://www.videolan.org/developers/lists.html  vlc-devel mailinglist ].&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; do this now:  http://developer.apple.com/technology/xcode.html &amp;lt;br&amp;gt;&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Git&#039;&#039;&#039; do this now: http://git-scm.com/&lt;br /&gt;
* Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&lt;br /&gt;
&lt;br /&gt;
== Quick Steps ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build VLC: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Add needed libs to VLC.app:&lt;br /&gt;
&lt;br /&gt;
 $ make VLC-release.app&lt;br /&gt;
&lt;br /&gt;
Read next section for more details.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15125</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15125"/>
		<updated>2009-12-20T10:42:14Z</updated>

		<summary type="html">&lt;p&gt;Global667: Clearing the preparation issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prepare Mac OS X for build VLC ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code. If you compile from [[Git]] then please remember that this code can often be in an unstable state so &#039;&#039;don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* If you wish to develop or test please join the [http://www.videolan.org/developers/lists.html  vlc-devel mailinglist ].&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Developer Tools from Apple&#039;&#039;&#039; do this now:  http://developer.apple.com/technology/xcode.html &amp;lt;br&amp;gt;&lt;br /&gt;
* If you doesn&#039;t have installed &#039;&#039;&#039;Git&#039;&#039;&#039; do this now: http://git-scm.com/&lt;br /&gt;
* Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&lt;br /&gt;
&lt;br /&gt;
== Quick Steps ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build vlc: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Read next section for more details.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15124</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15124"/>
		<updated>2009-12-20T10:20:28Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Compile VLC on Mac OS X */ link added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compile VLC on Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code.&lt;br /&gt;
&lt;br /&gt;
If you compile from [[Git]] then please remember that this code can often be in an unstable state. If you wish to develop or test please join the [http://www.videolan.org/developers/lists.html  vlc-devel mailinglist ].&lt;br /&gt;
&lt;br /&gt;
Don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Quick Steps ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build vlc: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Read next section for more details.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15123</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15123"/>
		<updated>2009-12-20T10:15:30Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Quick Steps */ Yet a better Quicksteps tut&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compile VLC on Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code.&lt;br /&gt;
&lt;br /&gt;
If you compile from [[Git]] then please remember that this code can often be in an unstable state. If you wish to develop or test please join the vlc-devel mailinglist.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Quick Steps ==&lt;br /&gt;
Configure the environment:&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export CXXFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export LDFLAGS=&amp;quot;-arch i386&amp;quot; &lt;br /&gt;
  $ export OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Download the sources from repository:&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
&lt;br /&gt;
Build needed additional libs:&lt;br /&gt;
&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
 &lt;br /&gt;
Build vlc: &lt;br /&gt;
&lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ ./configure --enable-debug  &lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
Read next section for more details.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15122</id>
		<title>MacOSCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=MacOSCompile&amp;diff=15122"/>
		<updated>2009-12-20T10:06:51Z</updated>

		<summary type="html">&lt;p&gt;Global667: /* Quick Steps */ Prober...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Compile VLC on Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
Compiling {{VLC}} on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; isn&#039;t enough either. The instructions below are always for the currently unstable, non-released code.&lt;br /&gt;
&lt;br /&gt;
If you compile from [[Git]] then please remember that this code can often be in an unstable state. If you wish to develop or test please join the vlc-devel mailinglist.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t put any of the non-released test binaries or git-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Be sure to read the paragraph on Mac OS X Leopard before starting the compilation.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Quick Steps ==&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
  $ git clone git://git.videolan.org/vlc.git&lt;br /&gt;
  $ cd vlc/extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
  &lt;br /&gt;
  $ cd ../..&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
  &lt;br /&gt;
  $ make&lt;br /&gt;
Read next section for more details.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
Please follow these steps for compiling:&lt;br /&gt;
&lt;br /&gt;
=== Set the development environment ===&lt;br /&gt;
&lt;br /&gt;
Install the Mac OS X Developer Tools from the Developer Tools CD, or get them online. &lt;br /&gt;
&lt;br /&gt;
You need at least Mac OS X 10.5 and Xcode 3.1.2 for compilation. Mac OS X 10.6 and its Xcode releases are also supported. Make sure that the LLVM GCC 4.2 compiler is installed.&lt;br /&gt;
&lt;br /&gt;
Compiling with earlier releases of Mac OS X and/or Xcode will not work.&lt;br /&gt;
&lt;br /&gt;
Additionally, you may need to install Subversion (SVN) and more importantly Git on your Mac.&lt;br /&gt;
&lt;br /&gt;
=== Get the source ===&lt;br /&gt;
Download the {{VLC}} [[GetTheSource|source code]] (using [[Git]]) as described on the [[GetTheSource| &amp;quot;Get the source&amp;quot;]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release&#039;s publication.&lt;br /&gt;
&lt;br /&gt;
=== Build external libs ===&lt;br /&gt;
&lt;br /&gt;
We now need to build the [[Contrib_Status| 3rd party libs]]. For that, you will need to:&lt;br /&gt;
* cd to the source directory with your Terminal application.&lt;br /&gt;
* If you have fink, then you will need to disable it. {{VLC}} has it&#039;s own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that {{VLC}} requires. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First fetch the contribs. Those are external libraries needed by VLC.&lt;br /&gt;
  $ cd extras/contrib&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
The last command will download &#039;&#039;&#039;prebuilt&#039;&#039;&#039; binary contrib you can happily use to build VLC wth -- only if you&#039;re using git master branch or the bugfix branch for 0.9 / 1.0.&lt;br /&gt;
You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to debug these libraries or want to create a new package, you need to execute &amp;lt;code&amp;gt;make src&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that the 10.5 SDK is used by default. If you encounter problems, make sure that the script correctly used Apple&#039;s llvm-gcc-4.2 compiler and your Xcode installation is up-to-date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Prepare the VLC build ===&lt;br /&gt;
Now we return to VLC itself. Go back to the top level VLC source directory.  &lt;br /&gt;
  $ cd ../.. &lt;br /&gt;
  $ ./bootstrap &lt;br /&gt;
&lt;br /&gt;
This will create configure and Makefiles for {{VLC}} (snapshots and releases already include this).&lt;br /&gt;
&lt;br /&gt;
=== Setup the correct compiler ===&lt;br /&gt;
Current revisions of VLC need to be compiled using Apple&#039;s llvm-gcc-4.2 compiler in its latest version. In case of failures, make sure that the latest version of Xcode is installed.&lt;br /&gt;
To use this compiler, you need to export the respective variables. In a Bourne Shell, type this (if Xcode is installed to its default location; bash is the default shell on OS X):&lt;br /&gt;
&lt;br /&gt;
  $ export CC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
  $ export CXX=/Developer/usr/bin/llvm-g++-4.2&lt;br /&gt;
  $ export OBJC=/Developer/usr/bin/llvm-gcc-4.2&lt;br /&gt;
&lt;br /&gt;
If you are using a C-Shell, you need to use the &#039;&#039;setenv&#039;&#039; command of course.&lt;br /&gt;
&lt;br /&gt;
=== Configure the VLC build ===&lt;br /&gt;
The next step is to configure, in the top level VLC source directory.&lt;br /&gt;
&lt;br /&gt;
In current revisions, you can simply run&lt;br /&gt;
  $ ./configure --enable-debug&lt;br /&gt;
to get VLC in its default configuration. If do not want to use VLC&#039;s default configuration for Mac, be sure to add &amp;lt;code&amp;gt;--disable-macosx-defaults&amp;lt;/code&amp;gt; to your custom set. Using &amp;lt;code&amp;gt;--disable-nls&amp;lt;/code&amp;gt; will save you a lot of time, if you don&#039;t care about localised interfaces.&lt;br /&gt;
&lt;br /&gt;
When compiling earlier revisions or the 0.8.6 branch, you need to give a wide variety of configure flags to achieve a useful build. We used to use this set:&lt;br /&gt;
&amp;lt;code&amp;gt; ./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dca --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --enable-lua --disable-libtool&amp;lt;/code&amp;gt;&lt;br /&gt;
Have a look at configure.ac for our current default configuration.&lt;br /&gt;
&lt;br /&gt;
You can add &amp;lt;code&amp;gt;--with-mozilla-sdk-path=./extras/contrib/gecko-sdk --enable-mozilla&amp;lt;/code&amp;gt; to the configure-line to enable the compilation of VLC&#039;s Safari/Firefox plugin.&lt;br /&gt;
&lt;br /&gt;
=== Build VLC ===&lt;br /&gt;
After configure is finished, we can finally build {{VLC}}. A simple &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run &lt;br /&gt;
  $ make&lt;br /&gt;
  $ make VLC-release.app&lt;br /&gt;
afterwards. Use the resulting &#039;&#039;VLC-release.app&#039;&#039; for these purposes.&lt;br /&gt;
&lt;br /&gt;
If you want a disk-image, type &lt;br /&gt;
  $ make package-macosx&lt;br /&gt;
(respectively &amp;lt;code&amp;gt;make package-macosx-plugin&amp;lt;/code&amp;gt; for the Safari/Mozilla plugin).&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s wrong, if I don&#039;t succeed? ===&lt;br /&gt;
Starting with Leopard, Xcode may be installed to a custom location on the administrator&#039;s choice. While this is non-problematic for ordinary Xcode projects, VLC needs a little help. You have to place extra symbolic links in /Developer pointing to your custom location for these folders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;usr, Headers, Private, SDKs, Tools, Makefiles&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can easily create these links by executing the following command for each folder (whereas theFolder is one of these six):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ln -s /full/path/to/Developer/theFolder /Developer/theFolder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Additionally, make always sure that you are using the latest version of Xcode. Otherwise, VLC&#039;s compilation or behaviour at runtime won&#039;t be the way you want it to be.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== What about 64-bit? ==&lt;br /&gt;
Both the 1.0-bugfix branch and the master branch can be compiled in 64-bit mode on OS X, but it is considered experimental. This is only tested for x86_64, but PPC64 should also work. Precompiled contribs are usually available for x86_64. To see how to compile VLC this way, check the documentation of your GCC vendor, as there are known differences within the supported versions of Mac OS X, but you may try:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;After running bootstrap in extras/contrib&#039;&#039;&#039;: Replace the first line of config.mak to &amp;lt;code&amp;gt;ARCH=x86_64&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;ARCH=i386&amp;lt;/code&amp;gt;. Running &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; after only this change should cause the precompiled x86_64 contrib to be downloaded and extracted. (If you&#039;re compiling your own contrib, you should edit &amp;lt;code&amp;gt;CFLAGS_TUNING&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXTRA_LDFLAGS&amp;lt;/code&amp;gt; to use x86_64, and you may also want to change &amp;lt;code&amp;gt;CC&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CXX&amp;lt;/code&amp;gt; to use llvm versions.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running configure&#039;&#039;&#039;: Do something like &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch x86_64&amp;quot; CXXFLAGS=&amp;quot;-arch x86_64&amp;quot; LDFLAGS=&amp;quot;-arch x86_64&amp;quot; OBJCFLAGS=&amp;quot;-arch x86_64&amp;quot; --build=x86_64-apple-darwin9.7.0&amp;lt;/code&amp;gt; instead. Not all these flags may be necessary.&lt;br /&gt;
&lt;br /&gt;
== Snow Leopard ==&lt;br /&gt;
A series of problem affect the build under Mac OS X 10.6 (Snow Leopard / darwin 10), these include:&lt;br /&gt;
&lt;br /&gt;
=== 32-bit builds ===&lt;br /&gt;
The compiler now tries to build for the x86_64 arch by default, if you want to make a 32-bit build of VLC, you have to change the configure, similarly to what shown above: &amp;lt;code&amp;gt;./configure CFLAGS=&amp;quot;-arch i386&amp;quot; CXXFLAGS=&amp;quot;-arch i386&amp;quot; LDFLAGS=&amp;quot;-arch i386&amp;quot; OBJCFLAGS=&amp;quot;-arch i386&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing libiconv.la ===&lt;br /&gt;
The &amp;lt;code&amp;gt;/usr/lib/libiconv.la&amp;lt;/code&amp;gt; file has been removed, but the other .la files in contrib still reference it; the quickest way to fix this is &amp;lt;code&amp;gt;rm extras/contrib/lib/*.la&amp;lt;/code&amp;gt; (this should lead no negative consequences because OSX&#039;s dylib already provide dependency tracking).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and [[User:The DJ|Derk-Jan Hartman]], for the VideoLAN Team.&lt;br /&gt;
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Global667</name></author>
	</entry>
</feed>