<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mayera+Nagy</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mayera+Nagy"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Mayera_Nagy"/>
	<updated>2026-07-28T23:32:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_(MSVS2005)&amp;diff=31682</id>
		<title>Compiling the viewer (MSVS2005)</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_(MSVS2005)&amp;diff=31682"/>
		<updated>2007-09-15T21:12:30Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* OpenGL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CompileNav}}&lt;br /&gt;
&lt;br /&gt;
This page explains how you can compile the viewer on Microsoft Windows using Visual Studio 2005 or Visual C++ Express 2005.  Note that Lindens are using VS2003 and the whole setup is a bit easier there, so if you have Visual Studio 2003 available, you should read [[Compiling the viewer (MSVS2003)|compiling with VS2003]] and you will get less trouble with it than with VS2005. &lt;br /&gt;
&lt;br /&gt;
The following explanation is adjusted for Viewer releases 1.16.0.5 or later.  See an [http://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_%28MSVS2005%29&amp;amp;oldid=22294 older version of this page] for the Viewer releases 1.15 or before.&lt;br /&gt;
&lt;br /&gt;
= Preparing the Development Environment =&lt;br /&gt;
&lt;br /&gt;
== Installing/Configuring VS2005 ==&lt;br /&gt;
&lt;br /&gt;
You need to setup the compiler and Microsoft Development tools as follows:&lt;br /&gt;
* Visual Studio 2005 &#039;&#039;&#039;&#039;&#039;-or-&#039;&#039;&#039;&#039;&#039; [http://msdn.microsoft.com/vstudio/express/visualc/download/ Visual C++ 2005 Express]&amp;lt;small&amp;gt;(Free)&amp;lt;/small&amp;gt; (Also, although not strictly necessary, eventually pick up and install SP1 for VS2005.)&lt;br /&gt;
* [http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;amp;displaylang=en Microsoft Platform SDK]&lt;br /&gt;
* A DirectX 9.0 SDK released on or after Summer of 2003 [http://download.microsoft.com/download/5/1/f/51ff8357-0af3-418b-9d0b-e9a5cdc39759/dxsdk_dec2006.EXE DirectX 9.0 SDK (December 2006)] [http://www.microsoft.com/downloads/details.aspx?FamilyID=9216652f-51e0-402e-b7b5-feb68d00f298&amp;amp;displaylang=en DirectX 9.0 SDK Update (Summer 2003)]&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -&amp;gt; Add or Remove Programs) before installing this version.  Installing the new SDK &amp;quot;on top&amp;quot; of an older version may cause problems.&lt;br /&gt;
* Set up the project globals:&lt;br /&gt;
** Start Microsoft Visual Studio 2005&lt;br /&gt;
** Go to Tools &amp;gt; Options &amp;gt; Projects &amp;gt; VC++ Directories&lt;br /&gt;
** Make sure that the &#039;&#039;&#039;includes&#039;&#039;&#039; ([[:Image:MSVS2005 Global Project Options Include Files.JPG|&#039;&#039;&#039;screen shot&#039;&#039;&#039;]]) and &#039;&#039;&#039;libraries&#039;&#039;&#039; ([[:Image:MSVS2005 Global Project Options Library Files.JPG|&#039;&#039;&#039;screen shot&#039;&#039;&#039;]]) paths have the Platform SDK paths first, then the DirectX SDK paths, and then the Visual C++ paths. You may need to check &amp;quot;Show All Settings&amp;quot; at the bottom for VC++ Directories to show.&lt;br /&gt;
** If the DirectX SDK paths aren&#039;t present, add them to both &#039;&#039;&#039;includes&#039;&#039;&#039; and &#039;&#039;&#039;libraries&#039;&#039;&#039;.&lt;br /&gt;
*: Note: The newest DirectX SDK (&amp;quot;December 2006&amp;quot;) lib folder has two sub-folders, x64 and x86.  Make sure your path goes to one of them (select &#039;&#039;&#039;lib/x86&#039;&#039;&#039;, not just &#039;&#039;&#039;lib&#039;&#039;&#039;), or you will get a Link error.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting other Development Tools ==&lt;br /&gt;
You will also need some open source development tools.&lt;br /&gt;
* [http://www.cygwin.com/ Cygwin]&lt;br /&gt;
** When you run the cygwin setup utility make sure you have selected to install &#039;&#039;&#039;patchutils&#039;&#039;&#039;, &#039;&#039;&#039;flex&#039;&#039;&#039;, and &#039;&#039;&#039;bison&#039;&#039;&#039; (all located under &amp;quot;devel&amp;quot;) which are not part of the default install. The project files use several hardcoded references that expect Cygwin to be installed at &#039;&#039;&#039;C:\cygwin&#039;&#039;&#039;, if it&#039;s not you&#039;ll need to edit those references.&lt;br /&gt;
* [http://www.activestate.com/Products/ActivePython/?mp=1 ActivePython 2.3x or later] - Latest Version is 2.5.1.1&lt;br /&gt;
** It is required but can be avoided if you are compiling 1.18 or later viewers.  Either download and install or hack the prebuild.bat files as described in [http://jira.secondlife.com/browse/VWR-1267 VWR-1267].&lt;br /&gt;
* ActivePerl was recommended for previous versions on this Wiki, but it currently appears, that it is not strictly necessary unless you are planning to build your own version of all libraries (which most likely you don&#039;t want to do).  So for a start it may be safe to skip it.&lt;br /&gt;
*: [http://www.activestate.com/Products/ActivePerl/?mp=1 ActivePerl]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Downloading Source Code =&lt;br /&gt;
&lt;br /&gt;
You can download the Viewer source codes on the [[source downloads]] page.  You can also use a [[version control repository]].&lt;br /&gt;
&lt;br /&gt;
At a minimum, grab the source package and the artwork package, but for a start, also grab the library archive.  Many of the libraries can either be compiled from source or downloaded from other sites (see below), but this will take hours and thus it is easiest to also get the package with libraries compiled by the Lindens.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039;&lt;br /&gt;
* If the directory path you keep the SL source in has a space in it, the batch file that copies message_template.msg will fail. So, if you unzip or checkout the source tree into, e.g., &amp;quot;C:\Projects\Dir with space in name\Etc\linden&amp;quot;, it won&#039;t work!&lt;br /&gt;
* You should also avoid using non-ASCII (national) characters in the paths, although some localized versions of the tool puts some as a default...&lt;br /&gt;
* Unzip or checkout your source tree into a directory that has as short full pathname as possible, since long paths cause some unexpected trouble during the build.&lt;br /&gt;
&lt;br /&gt;
In other words, the easiest way to get this working is to get &#039;&#039;source&#039;&#039;, &#039;&#039;artwork&#039;&#039; and &#039;&#039;libraries&#039;&#039; from the [[source downloads]] page and unpack them all into the same directory/folder, which ideally would be a folder in (or near) the root directory with a short name like &#039;&#039;sl_1_16_0_5&#039;&#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing Libraries =&lt;br /&gt;
&lt;br /&gt;
SL Viewer depends on some third party libraries.  Some of them are open source, some others are not.&lt;br /&gt;
&lt;br /&gt;
== Open Source Libraries ==&lt;br /&gt;
&lt;br /&gt;
You can download the pre-build open source libraries from LL.  They are available on [[source downloads]] page.  Unzip them into your SL viewer source code directory, maintaining the same directory structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: The VS2003 libraries provided in the [[source downloads]] do not fully work with VS2005 compiled binaries. They will compile with the viewer under VS2005, but the VS2003 libraries are not fully STL compliant. The differences of [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrfnonstandardbehavior.asp non-standard behavior in MSVS] are the known cause.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alternatively, it may be possible to get the source files for the libraries and build by yourself.  See [[Compiling the viewer libraries (MSVS 2003)|the instruction for VS2003 users]] if you try it.  Please note, however, it is not known that VS2005 can successfully compile the libraries.  &#039;&#039;&#039;You have been warned.&#039;&#039;&#039;  (If you can make it, please write the info on this wiki...)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proprietary Libraries ==&lt;br /&gt;
&lt;br /&gt;
Lindens does not inlcude the following proprietary libraries.  You will need to follow the instructions to acquire below and copy them to the source path.&lt;br /&gt;
&lt;br /&gt;
However, it probably is a good idea to build an empty directory tree for the files below and first copy the files there and once completed, copy the whole tree to the actual source folder (like &#039;&#039;XCOPY OLIB SL_1_16_0_5 /S&#039;&#039;).  The reason is, that these steps are cumbersome and will have to be repeated for each new release (at least if you keep the source for each release in it&#039;s own folder).  If you do not want to do this, of course you can just copy the files directly into the linden source paths.&lt;br /&gt;
&lt;br /&gt;
 rem OLIBS.CMD to build a folder tree for 3rd party libraries and includes&lt;br /&gt;
 md olibs&lt;br /&gt;
 md olibs\linden\&lt;br /&gt;
 md olibs\linden\libraries&lt;br /&gt;
 md olibs\linden\libraries\include&lt;br /&gt;
 md olibs\linden\libraries\i686-win32&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\lib_release&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\lib_debug&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include\GL&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include\quicktime&lt;br /&gt;
 md olibs\linden\indra&lt;br /&gt;
 md olibs\linden\indra\newview&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Fmod ===&lt;br /&gt;
* Download &amp;amp; extract [http://www.fmod.org/index.php/download fmod 3.75 api for win32] (later versions, like FMOD Ex, are incompatible).&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\inc\fmod.h&amp;quot; to &amp;quot;linden\libraries\include&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\inc\fmod_errors.h&amp;quot; to &amp;quot;linden\libraries\include&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\lib\fmodvc.lib&amp;quot; to &amp;quot;linden\libraries\i686-win32\lib_release&amp;quot; and to &amp;quot;linden\libraries\i686-win32\lib_debug&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\fmod.dll&amp;quot; to &amp;quot;linden\indra\newview&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenGL ===&lt;br /&gt;
* Download [http://oss.sgi.com/projects/ogl-sample/sdk.html glext.h, glxext.h, and wglext.h]&lt;br /&gt;
* Copy them to &amp;quot;linden\libraries\i686-win32\include\GL&amp;quot;&lt;br /&gt;
* You don&#039;t need any additional *.lib or *.dll for OpenGL.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Quicktime &#039;&#039;(optional)&#039;&#039; ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This download requires a registration at the Apple Quicktime website and take a bit of time.  You can avoid using QuickTime if you want, bee [[#QuickTime removal|below]] for details.  Remember that your viewer &#039;&#039;&#039;can&#039;t play in-world movies&#039;&#039;&#039; if you do so.&lt;br /&gt;
* Download &amp;amp; install the [http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/203/wa/getSoftware?fileID=20525&amp;amp;code=y&amp;amp;source=x&amp;amp;wosid=4h16WcyMtVfd2P1EffGafkoxFcr Quicktime SDK for Windows]&lt;br /&gt;
* Copy &amp;quot;QuicktimeSDK\Libraries\QTMLClient.lib&amp;quot; to &amp;quot;linden\libraries\i686-win32\lib_release&amp;quot; and to  &amp;quot;linden\libraries\i686-win32\lib_debug&amp;quot;.&lt;br /&gt;
* Copy the contents of &amp;quot;QuicktimeSDK\CIncludes&amp;quot; into &amp;quot;linden\libraries\i686-win32\include\quicktime&amp;quot;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configuring for VS2005 =&lt;br /&gt;
&lt;br /&gt;
Lindens use VS2003 to develop the viewer.  &lt;br /&gt;
&lt;br /&gt;
You either need to convert &#039;&#039;solution file&#039;&#039; and &#039;&#039;project files&#039;&#039; from VS2003 format to VS2005 format or obtain files compatible with VS2005.  You may also need to modify source files to work around the incompatibility between VS2003 and VS2005.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: linden\indra\indra_complete_vs8.sln is a solution file already included in the source archive and intended for the Visual Studio 2005, but it &#039;&#039;&#039;does not work&#039;&#039;&#039; (at least between 1.14.0 and 1.17.0.9 distribution).  This may change in a future release, if Lindens include an updated versions of the &#039;&#039;&#039;_vc8&#039;&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Using pre-built solution/project files ==&lt;br /&gt;
&lt;br /&gt;
Currently there is a ZIP file with solution/project files available on the [https://jira.secondlife.com/browse/VWR-1151 JIRA bug tracker issue VWR-1151].  &lt;br /&gt;
&lt;br /&gt;
If you are building 1.16 or later, the easiest way towards compiling SL on MS2005 will be to use the zip file mentioned above.  The details is as follows:&lt;br /&gt;
* Download the appropriate ZIP archive from JIRA.&lt;br /&gt;
* Unpack it and copy it onto your linden source tree (allow to overwrite files that have &#039;&#039;&#039;_vc8&#039;&#039;&#039; in the name).&lt;br /&gt;
* Start Visual Studio 2005 (or VC++ Express).&lt;br /&gt;
* Use &amp;quot;File &amp;gt; Open &amp;gt; Project/Solution&amp;quot; to open the linden\indra\indra_complete\indra_complete&#039;&#039;&#039;_vc8&#039;&#039;&#039;.sln (Note: If you plan to work with multiple versions over time, you will find it useful to rename &#039;&#039;&#039;indra_complete_vc8.sln&#039;&#039;&#039; to something which contains the version number, e.g. &#039;&#039;&#039;indra_1_17_0_11_vc8.sln&#039;&#039;&#039; before opening.)&lt;br /&gt;
* Right click &#039;&#039;&#039;newview&#039;&#039;&#039; in the frame Solution Explorer and click &amp;quot;Set as StartUp Project&amp;quot;.&lt;br /&gt;
* Proceed with applying the &#039;&#039;&#039;Workarounds&#039;&#039;&#039; below (skip &#039;&#039;&#039;Manual conversion&#039;&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The solution/project files depends on the viewer release version.  If you are compiling some specific version of the viewer, and the {{JIRA|VWR-1151}} doesn&#039;t list the zip file for you version, you can try using the most close one.  If, while compiling, you later encounter errors or problems regarding the projects, you may have to do the manual conversion instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual conversion of the solution/projects ==&lt;br /&gt;
&lt;br /&gt;
If you can not find a set of project files (see above), there are instructions available how to manually do it: [[Converting_project_files_for_MSVS2005]] (this step will take about 5-15 minutes, depending on how proficient you are using VS2005).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workarounds ==&lt;br /&gt;
&lt;br /&gt;
There are more compatibility problems between VS2003 and VS2005.  You need the following code edits.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== test project/crash_logger/updater ===&lt;br /&gt;
&lt;br /&gt;
For whatever reason, the &#039;&#039;&#039;test&#039;&#039;&#039; project doesn&#039;t work under VS2005.  Workaround is to disable it as follows: Right click on the &#039;&#039;&#039;test&#039;&#039;&#039; and choose &#039;&#039;&#039;Unload Project&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you do not plan to create a full download build, you can exclude the &#039;&#039;&#039;win_crash_logger&#039;&#039;&#039; and &#039;&#039;&#039;win_updater&#039;&#039;&#039; from newview&#039;s project dependencies and unload them also.  But be careful with unloading these projects without removing them from the dependencies, because I have seen VS2005 act highly erratic while linking then project when I tried this.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== QuickTime removal ===&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to get Apple QuickTime SDK, you can disable it as follows:&lt;br /&gt;
*linden\indra\llcommon\llpreprocessor.h - near line 58 (the line below &#039;&#039;&#039;#elif LL_WINDOWS&#039;&#039;&#039;)&lt;br /&gt;
 --50: #define LL_QUICKTIME_ENABLED	1&lt;br /&gt;
 ++50: #define LL_QUICKTIME_ENABLED	&#039;&#039;&#039;&#039;&#039;0&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Pick &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; in the Solution Configurations drop-down box beside the green arrow under the tool bar, and do the followings on the Solution Explorer frame:&lt;br /&gt;
*Click &#039;&#039;&#039;newview&#039;&#039;&#039; to select it alone.&lt;br /&gt;
**Choose Properties.&lt;br /&gt;
**Under Configuration Properties &amp;gt; Linker &amp;gt; Input, click &#039;&#039;&#039;Additional Dependencies&#039;&#039;&#039; on the right to show a button labeled &amp;quot;&#039;&#039;&#039;...&#039;&#039;&#039;&amp;quot; on it at the very right on the line, then click the &#039;&#039;&#039;...&#039;&#039;&#039; button.&lt;br /&gt;
**Scroll down the list to find &#039;&#039;&#039;qtmlclient.lib&#039;&#039;&#039;.  Delete this single line.&lt;br /&gt;
**Click &#039;&#039;&#039;OK&#039;&#039;&#039; to close the &amp;quot;Additional Dependencies&amp;quot; dialog, then click OK again to close the &amp;quot;newview Property Pages&amp;quot; dialog box.&lt;br /&gt;
* Pick &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; in the Solution Configurations drop-down box. Click &#039;&#039;&#039;newview&#039;&#039;&#039; to select it alone and do the same thing again.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Ready, Set, Build! =&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
* Build either &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; (for debugging) or &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; (for production code).&lt;br /&gt;
* To do this, pick either in the Solution Configurations drop-down box beside the green arrow under the tool bar.&lt;br /&gt;
* Make sure &#039;&#039;&#039;newview&#039;&#039;&#039; is set as the active project (otherwise set from newview&#039;s right-click menu).&lt;br /&gt;
* Select Build-Menu &amp;gt; Build Solution or press F7.&lt;br /&gt;
* newview_noopt.exe will be built in linden\indra\newview\ReleaseNoOpt or SecondLife.exe will be linden\indra\newview\ReleaseForDownload.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Common compile errors ==&lt;br /&gt;
* See [[Common compilation problems]] if you run into other errors while building.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Running ==&lt;br /&gt;
* You can run the viewer by &#039;&#039;&#039;Debug &amp;gt; Start Debugging&#039;&#039;&#039; or &#039;&#039;&#039;Debug &amp;gt; Start &amp;quot;Without Debugging&#039;&#039;&#039; in Visual Studio. &lt;br /&gt;
* To run it outside VS, create a shortcut to SecondLife.exe, and change the start location to linden\indra\newview\ (all the .dll will be found there.)&lt;br /&gt;
* Alternately copy the exe (possibly rename it) to your &amp;quot;c:\program files\second life&amp;quot; folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Debugging Info/Configurations ==&lt;br /&gt;
* Usually you will either use &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; or the &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; configuration.&lt;br /&gt;
* &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; (not optimized) compiles faster and has more debugging information, but this comes at a runtime penalty of about 50% of your FPS in busy areas, compared to ReleaseForDownload build.&lt;br /&gt;
* &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; also has debugging information and runs fine in the debugger (although at times you may miss access to some local variables).&lt;br /&gt;
* &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; comes with a seperate debugging console window opens and stays open for the duration of your session, but you can access the same information also by pressing Shift+Ctrl+4 in the viewer (all builds).&lt;br /&gt;
* The debug console log can also be redirected to a file if you add &amp;quot;2&amp;gt;secondlife.log&amp;quot; to the command line (Newview, Properties, Debugging, Command line arguments).&lt;br /&gt;
* If you want to build a &#039;&#039;&#039;Debug&#039;&#039;&#039; configuration, see the specific section with compile instructions on [[Finding_leaks]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problems Running? ==&lt;br /&gt;
* &#039;&#039;&#039;Inventory errors&#039;&#039;&#039;: If you&#039;re getting errors while trying to load your inventory, try [[Help:Stuck logging in|clearing your cache and deleting other temporary files]].&lt;br /&gt;
* &#039;&#039;&#039;Missing smime3 DLL&#039;&#039;&#039;: Those are parts of the integrated web browser.  Copy &#039;smime3.dll&#039;, &#039;nss3.dll&#039;, &#039;softokn3.dll&#039;, and &#039;ssl3.dll&#039; files from your official client&#039;s main folder to &amp;quot;linden\indra\newview&amp;quot;.&lt;br /&gt;
* &#039;&#039;&#039;Can&#039;t connect&#039;&#039;&#039;: In the debug builds there is a selection box on the login screen to select the server to connect to.  &#039;&#039;&#039;Agni&#039;&#039;&#039; is the production grid, &#039;&#039;&#039;aditi&#039;&#039;&#039; is the beta grid.  (There seems to be a bug in this part of the code, you may have to make your selection, close the viewer and repoen it, before you can connect to the selected grid).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Submit Patches =&lt;br /&gt;
This is probably faaar down the road, but if you make changes to the source and want to submit them, see the page about [[Submitting patches|submitting patches]].&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_(MSVS2005)&amp;diff=31681</id>
		<title>Compiling the viewer (MSVS2005)</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_(MSVS2005)&amp;diff=31681"/>
		<updated>2007-09-15T21:11:12Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* Installing Libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CompileNav}}&lt;br /&gt;
&lt;br /&gt;
This page explains how you can compile the viewer on Microsoft Windows using Visual Studio 2005 or Visual C++ Express 2005.  Note that Lindens are using VS2003 and the whole setup is a bit easier there, so if you have Visual Studio 2003 available, you should read [[Compiling the viewer (MSVS2003)|compiling with VS2003]] and you will get less trouble with it than with VS2005. &lt;br /&gt;
&lt;br /&gt;
The following explanation is adjusted for Viewer releases 1.16.0.5 or later.  See an [http://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_%28MSVS2005%29&amp;amp;oldid=22294 older version of this page] for the Viewer releases 1.15 or before.&lt;br /&gt;
&lt;br /&gt;
= Preparing the Development Environment =&lt;br /&gt;
&lt;br /&gt;
== Installing/Configuring VS2005 ==&lt;br /&gt;
&lt;br /&gt;
You need to setup the compiler and Microsoft Development tools as follows:&lt;br /&gt;
* Visual Studio 2005 &#039;&#039;&#039;&#039;&#039;-or-&#039;&#039;&#039;&#039;&#039; [http://msdn.microsoft.com/vstudio/express/visualc/download/ Visual C++ 2005 Express]&amp;lt;small&amp;gt;(Free)&amp;lt;/small&amp;gt; (Also, although not strictly necessary, eventually pick up and install SP1 for VS2005.)&lt;br /&gt;
* [http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;amp;displaylang=en Microsoft Platform SDK]&lt;br /&gt;
* A DirectX 9.0 SDK released on or after Summer of 2003 [http://download.microsoft.com/download/5/1/f/51ff8357-0af3-418b-9d0b-e9a5cdc39759/dxsdk_dec2006.EXE DirectX 9.0 SDK (December 2006)] [http://www.microsoft.com/downloads/details.aspx?FamilyID=9216652f-51e0-402e-b7b5-feb68d00f298&amp;amp;displaylang=en DirectX 9.0 SDK Update (Summer 2003)]&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -&amp;gt; Add or Remove Programs) before installing this version.  Installing the new SDK &amp;quot;on top&amp;quot; of an older version may cause problems.&lt;br /&gt;
* Set up the project globals:&lt;br /&gt;
** Start Microsoft Visual Studio 2005&lt;br /&gt;
** Go to Tools &amp;gt; Options &amp;gt; Projects &amp;gt; VC++ Directories&lt;br /&gt;
** Make sure that the &#039;&#039;&#039;includes&#039;&#039;&#039; ([[:Image:MSVS2005 Global Project Options Include Files.JPG|&#039;&#039;&#039;screen shot&#039;&#039;&#039;]]) and &#039;&#039;&#039;libraries&#039;&#039;&#039; ([[:Image:MSVS2005 Global Project Options Library Files.JPG|&#039;&#039;&#039;screen shot&#039;&#039;&#039;]]) paths have the Platform SDK paths first, then the DirectX SDK paths, and then the Visual C++ paths. You may need to check &amp;quot;Show All Settings&amp;quot; at the bottom for VC++ Directories to show.&lt;br /&gt;
** If the DirectX SDK paths aren&#039;t present, add them to both &#039;&#039;&#039;includes&#039;&#039;&#039; and &#039;&#039;&#039;libraries&#039;&#039;&#039;.&lt;br /&gt;
*: Note: The newest DirectX SDK (&amp;quot;December 2006&amp;quot;) lib folder has two sub-folders, x64 and x86.  Make sure your path goes to one of them (select &#039;&#039;&#039;lib/x86&#039;&#039;&#039;, not just &#039;&#039;&#039;lib&#039;&#039;&#039;), or you will get a Link error.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting other Development Tools ==&lt;br /&gt;
You will also need some open source development tools.&lt;br /&gt;
* [http://www.cygwin.com/ Cygwin]&lt;br /&gt;
** When you run the cygwin setup utility make sure you have selected to install &#039;&#039;&#039;patchutils&#039;&#039;&#039;, &#039;&#039;&#039;flex&#039;&#039;&#039;, and &#039;&#039;&#039;bison&#039;&#039;&#039; (all located under &amp;quot;devel&amp;quot;) which are not part of the default install. The project files use several hardcoded references that expect Cygwin to be installed at &#039;&#039;&#039;C:\cygwin&#039;&#039;&#039;, if it&#039;s not you&#039;ll need to edit those references.&lt;br /&gt;
* [http://www.activestate.com/Products/ActivePython/?mp=1 ActivePython 2.3x or later] - Latest Version is 2.5.1.1&lt;br /&gt;
** It is required but can be avoided if you are compiling 1.18 or later viewers.  Either download and install or hack the prebuild.bat files as described in [http://jira.secondlife.com/browse/VWR-1267 VWR-1267].&lt;br /&gt;
* ActivePerl was recommended for previous versions on this Wiki, but it currently appears, that it is not strictly necessary unless you are planning to build your own version of all libraries (which most likely you don&#039;t want to do).  So for a start it may be safe to skip it.&lt;br /&gt;
*: [http://www.activestate.com/Products/ActivePerl/?mp=1 ActivePerl]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Downloading Source Code =&lt;br /&gt;
&lt;br /&gt;
You can download the Viewer source codes on the [[source downloads]] page.  You can also use a [[version control repository]].&lt;br /&gt;
&lt;br /&gt;
At a minimum, grab the source package and the artwork package, but for a start, also grab the library archive.  Many of the libraries can either be compiled from source or downloaded from other sites (see below), but this will take hours and thus it is easiest to also get the package with libraries compiled by the Lindens.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039;&lt;br /&gt;
* If the directory path you keep the SL source in has a space in it, the batch file that copies message_template.msg will fail. So, if you unzip or checkout the source tree into, e.g., &amp;quot;C:\Projects\Dir with space in name\Etc\linden&amp;quot;, it won&#039;t work!&lt;br /&gt;
* You should also avoid using non-ASCII (national) characters in the paths, although some localized versions of the tool puts some as a default...&lt;br /&gt;
* Unzip or checkout your source tree into a directory that has as short full pathname as possible, since long paths cause some unexpected trouble during the build.&lt;br /&gt;
&lt;br /&gt;
In other words, the easiest way to get this working is to get &#039;&#039;source&#039;&#039;, &#039;&#039;artwork&#039;&#039; and &#039;&#039;libraries&#039;&#039; from the [[source downloads]] page and unpack them all into the same directory/folder, which ideally would be a folder in (or near) the root directory with a short name like &#039;&#039;sl_1_16_0_5&#039;&#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing Libraries =&lt;br /&gt;
&lt;br /&gt;
SL Viewer depends on some third party libraries.  Some of them are open source, some others are not.&lt;br /&gt;
&lt;br /&gt;
== Open Source Libraries ==&lt;br /&gt;
&lt;br /&gt;
You can download the pre-build open source libraries from LL.  They are available on [[source downloads]] page.  Unzip them into your SL viewer source code directory, maintaining the same directory structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: The VS2003 libraries provided in the [[source downloads]] do not fully work with VS2005 compiled binaries. They will compile with the viewer under VS2005, but the VS2003 libraries are not fully STL compliant. The differences of [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrfnonstandardbehavior.asp non-standard behavior in MSVS] are the known cause.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alternatively, it may be possible to get the source files for the libraries and build by yourself.  See [[Compiling the viewer libraries (MSVS 2003)|the instruction for VS2003 users]] if you try it.  Please note, however, it is not known that VS2005 can successfully compile the libraries.  &#039;&#039;&#039;You have been warned.&#039;&#039;&#039;  (If you can make it, please write the info on this wiki...)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proprietary Libraries ==&lt;br /&gt;
&lt;br /&gt;
Lindens does not inlcude the following proprietary libraries.  You will need to follow the instructions to acquire below and copy them to the source path.&lt;br /&gt;
&lt;br /&gt;
However, it probably is a good idea to build an empty directory tree for the files below and first copy the files there and once completed, copy the whole tree to the actual source folder (like &#039;&#039;XCOPY OLIB SL_1_16_0_5 /S&#039;&#039;).  The reason is, that these steps are cumbersome and will have to be repeated for each new release (at least if you keep the source for each release in it&#039;s own folder).  If you do not want to do this, of course you can just copy the files directly into the linden source paths.&lt;br /&gt;
&lt;br /&gt;
 rem OLIBS.CMD to build a folder tree for 3rd party libraries and includes&lt;br /&gt;
 md olibs&lt;br /&gt;
 md olibs\linden\&lt;br /&gt;
 md olibs\linden\libraries&lt;br /&gt;
 md olibs\linden\libraries\include&lt;br /&gt;
 md olibs\linden\libraries\i686-win32&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\lib_release&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\lib_debug&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include\GL&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include\quicktime&lt;br /&gt;
 md olibs\linden\indra&lt;br /&gt;
 md olibs\linden\indra\newview&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Fmod ===&lt;br /&gt;
* Download &amp;amp; extract [http://www.fmod.org/index.php/download fmod 3.75 api for win32] (later versions, like FMOD Ex, are incompatible).&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\inc\fmod.h&amp;quot; to &amp;quot;linden\libraries\include&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\inc\fmod_errors.h&amp;quot; to &amp;quot;linden\libraries\include&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\lib\fmodvc.lib&amp;quot; to &amp;quot;linden\libraries\i686-win32\lib_release&amp;quot; and to &amp;quot;linden\libraries\i686-win32\lib_debug&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\fmod.dll&amp;quot; to &amp;quot;linden\indra\newview&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenGL ===&lt;br /&gt;
* Download [http://oss.sgi.com/projects/ogl-sample/sdk.html glext.h, glxext.h, and wglext.h]&lt;br /&gt;
* Copy them to &amp;quot;linden\libraries\i686-win32\include\GL&amp;quot;&lt;br /&gt;
* You don&#039;t need any additional *.lib or *.dll for OpenGL.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Quicktime &#039;&#039;(optional)&#039;&#039; ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This download requires a registration at the Apple Quicktime website and take a bit of time.  You can avoid using QuickTime if you want, bee [[#QuickTime removal|below]] for details.  Remember that your viewer &#039;&#039;&#039;can&#039;t play in-world movies&#039;&#039;&#039; if you do so.&lt;br /&gt;
* Download &amp;amp; install the [http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/203/wa/getSoftware?fileID=20525&amp;amp;code=y&amp;amp;source=x&amp;amp;wosid=4h16WcyMtVfd2P1EffGafkoxFcr Quicktime SDK for Windows]&lt;br /&gt;
* Copy &amp;quot;QuicktimeSDK\Libraries\QTMLClient.lib&amp;quot; to &amp;quot;linden\libraries\i686-win32\lib_release&amp;quot; and to  &amp;quot;linden\libraries\i686-win32\lib_debug&amp;quot;.&lt;br /&gt;
* Copy the contents of &amp;quot;QuicktimeSDK\CIncludes&amp;quot; into &amp;quot;linden\libraries\i686-win32\include\quicktime&amp;quot;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configuring for VS2005 =&lt;br /&gt;
&lt;br /&gt;
Lindens use VS2003 to develop the viewer.  &lt;br /&gt;
&lt;br /&gt;
You either need to convert &#039;&#039;solution file&#039;&#039; and &#039;&#039;project files&#039;&#039; from VS2003 format to VS2005 format or obtain files compatible with VS2005.  You may also need to modify source files to work around the incompatibility between VS2003 and VS2005.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: linden\indra\indra_complete_vs8.sln is a solution file already included in the source archive and intended for the Visual Studio 2005, but it &#039;&#039;&#039;does not work&#039;&#039;&#039; (at least between 1.14.0 and 1.17.0.9 distribution).  This may change in a future release, if Lindens include an updated versions of the &#039;&#039;&#039;_vc8&#039;&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Using pre-built solution/project files ==&lt;br /&gt;
&lt;br /&gt;
Currently there is a ZIP file with solution/project files available on the [https://jira.secondlife.com/browse/VWR-1151 JIRA bug tracker issue VWR-1151].  &lt;br /&gt;
&lt;br /&gt;
If you are building 1.16 or later, the easiest way towards compiling SL on MS2005 will be to use the zip file mentioned above.  The details is as follows:&lt;br /&gt;
* Download the appropriate ZIP archive from JIRA.&lt;br /&gt;
* Unpack it and copy it onto your linden source tree (allow to overwrite files that have &#039;&#039;&#039;_vc8&#039;&#039;&#039; in the name).&lt;br /&gt;
* Start Visual Studio 2005 (or VC++ Express).&lt;br /&gt;
* Use &amp;quot;File &amp;gt; Open &amp;gt; Project/Solution&amp;quot; to open the linden\indra\indra_complete\indra_complete&#039;&#039;&#039;_vc8&#039;&#039;&#039;.sln (Note: If you plan to work with multiple versions over time, you will find it useful to rename &#039;&#039;&#039;indra_complete_vc8.sln&#039;&#039;&#039; to something which contains the version number, e.g. &#039;&#039;&#039;indra_1_17_0_11_vc8.sln&#039;&#039;&#039; before opening.)&lt;br /&gt;
* Right click &#039;&#039;&#039;newview&#039;&#039;&#039; in the frame Solution Explorer and click &amp;quot;Set as StartUp Project&amp;quot;.&lt;br /&gt;
* Proceed with applying the &#039;&#039;&#039;Workarounds&#039;&#039;&#039; below (skip &#039;&#039;&#039;Manual conversion&#039;&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The solution/project files depends on the viewer release version.  If you are compiling some specific version of the viewer, and the {{JIRA|VWR-1151}} doesn&#039;t list the zip file for you version, you can try using the most close one.  If, while compiling, you later encounter errors or problems regarding the projects, you may have to do the manual conversion instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual conversion of the solution/projects ==&lt;br /&gt;
&lt;br /&gt;
If you can not find a set of project files (see above), there are instructions available how to manually do it: [[Converting_project_files_for_MSVS2005]] (this step will take about 5-15 minutes, depending on how proficient you are using VS2005).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workarounds ==&lt;br /&gt;
&lt;br /&gt;
There are more compatibility problems between VS2003 and VS2005.  You need the following code edits.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== test project/crash_logger/updater ===&lt;br /&gt;
&lt;br /&gt;
For whatever reason, the &#039;&#039;&#039;test&#039;&#039;&#039; project doesn&#039;t work under VS2005.  Workaround is to disable it as follows: Right click on the &#039;&#039;&#039;test&#039;&#039;&#039; and choose &#039;&#039;&#039;Unload Project&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you do not plan to create a full download build, you can exclude the &#039;&#039;&#039;win_crash_logger&#039;&#039;&#039; and &#039;&#039;&#039;win_updater&#039;&#039;&#039; from newview&#039;s project dependencies and unload them also.  But be careful with unloading these projects without removing them from the dependencies, because I have seen VS2005 act highly erratic while linking then project when I tried this.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== QuickTime removal ===&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to get Apple QuickTime SDK, you can disable it as follows:&lt;br /&gt;
*linden\indra\llcommon\llpreprocessor.h - near line 58 (the line below &#039;&#039;&#039;#elif LL_WINDOWS&#039;&#039;&#039;)&lt;br /&gt;
 --50: #define LL_QUICKTIME_ENABLED	1&lt;br /&gt;
 ++50: #define LL_QUICKTIME_ENABLED	&#039;&#039;&#039;&#039;&#039;0&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Pick &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; in the Solution Configurations drop-down box beside the green arrow under the tool bar, and do the followings on the Solution Explorer frame:&lt;br /&gt;
*Click &#039;&#039;&#039;newview&#039;&#039;&#039; to select it alone.&lt;br /&gt;
**Choose Properties.&lt;br /&gt;
**Under Configuration Properties &amp;gt; Linker &amp;gt; Input, click &#039;&#039;&#039;Additional Dependencies&#039;&#039;&#039; on the right to show a button labeled &amp;quot;&#039;&#039;&#039;...&#039;&#039;&#039;&amp;quot; on it at the very right on the line, then click the &#039;&#039;&#039;...&#039;&#039;&#039; button.&lt;br /&gt;
**Scroll down the list to find &#039;&#039;&#039;qtmlclient.lib&#039;&#039;&#039;.  Delete this single line.&lt;br /&gt;
**Click &#039;&#039;&#039;OK&#039;&#039;&#039; to close the &amp;quot;Additional Dependencies&amp;quot; dialog, then click OK again to close the &amp;quot;newview Property Pages&amp;quot; dialog box.&lt;br /&gt;
* Pick &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; in the Solution Configurations drop-down box. Click &#039;&#039;&#039;newview&#039;&#039;&#039; to select it alone and do the same thing again.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Ready, Set, Build! =&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
* Build either &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; (for debugging) or &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; (for production code).&lt;br /&gt;
* To do this, pick either in the Solution Configurations drop-down box beside the green arrow under the tool bar.&lt;br /&gt;
* Make sure &#039;&#039;&#039;newview&#039;&#039;&#039; is set as the active project (otherwise set from newview&#039;s right-click menu).&lt;br /&gt;
* Select Build-Menu &amp;gt; Build Solution or press F7.&lt;br /&gt;
* newview_noopt.exe will be built in linden\indra\newview\ReleaseNoOpt or SecondLife.exe will be linden\indra\newview\ReleaseForDownload.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Common compile errors ==&lt;br /&gt;
* See [[Common compilation problems]] if you run into other errors while building.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Running ==&lt;br /&gt;
* You can run the viewer by &#039;&#039;&#039;Debug &amp;gt; Start Debugging&#039;&#039;&#039; or &#039;&#039;&#039;Debug &amp;gt; Start &amp;quot;Without Debugging&#039;&#039;&#039; in Visual Studio. &lt;br /&gt;
* To run it outside VS, create a shortcut to SecondLife.exe, and change the start location to linden\indra\newview\ (all the .dll will be found there.)&lt;br /&gt;
* Alternately copy the exe (possibly rename it) to your &amp;quot;c:\program files\second life&amp;quot; folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Debugging Info/Configurations ==&lt;br /&gt;
* Usually you will either use &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; or the &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; configuration.&lt;br /&gt;
* &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; (not optimized) compiles faster and has more debugging information, but this comes at a runtime penalty of about 50% of your FPS in busy areas, compared to ReleaseForDownload build.&lt;br /&gt;
* &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; also has debugging information and runs fine in the debugger (although at times you may miss access to some local variables).&lt;br /&gt;
* &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; comes with a seperate debugging console window opens and stays open for the duration of your session, but you can access the same information also by pressing Shift+Ctrl+4 in the viewer (all builds).&lt;br /&gt;
* The debug console log can also be redirected to a file if you add &amp;quot;2&amp;gt;secondlife.log&amp;quot; to the command line (Newview, Properties, Debugging, Command line arguments).&lt;br /&gt;
* If you want to build a &#039;&#039;&#039;Debug&#039;&#039;&#039; configuration, see the specific section with compile instructions on [[Finding_leaks]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problems Running? ==&lt;br /&gt;
* &#039;&#039;&#039;Inventory errors&#039;&#039;&#039;: If you&#039;re getting errors while trying to load your inventory, try [[Help:Stuck logging in|clearing your cache and deleting other temporary files]].&lt;br /&gt;
* &#039;&#039;&#039;Missing smime3 DLL&#039;&#039;&#039;: Those are parts of the integrated web browser.  Copy &#039;smime3.dll&#039;, &#039;nss3.dll&#039;, &#039;softokn3.dll&#039;, and &#039;ssl3.dll&#039; files from your official client&#039;s main folder to &amp;quot;linden\indra\newview&amp;quot;.&lt;br /&gt;
* &#039;&#039;&#039;Can&#039;t connect&#039;&#039;&#039;: In the debug builds there is a selection box on the login screen to select the server to connect to.  &#039;&#039;&#039;Agni&#039;&#039;&#039; is the production grid, &#039;&#039;&#039;aditi&#039;&#039;&#039; is the beta grid.  (There seems to be a bug in this part of the code, you may have to make your selection, close the viewer and repoen it, before you can connect to the selected grid).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Submit Patches =&lt;br /&gt;
This is probably faaar down the road, but if you make changes to the source and want to submit them, see the page about [[Submitting patches|submitting patches]].&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_(MSVS2005)&amp;diff=31664</id>
		<title>Compiling the viewer (MSVS2005)</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_(MSVS2005)&amp;diff=31664"/>
		<updated>2007-09-15T20:32:14Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* Preparing the Development Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{CompileNav}}&lt;br /&gt;
&lt;br /&gt;
This page explains how you can compile the viewer on Microsoft Windows using Visual Studio 2005 or Visual C++ Express 2005.  Note that Lindens are using VS2003 and the whole setup is a bit easier there, so if you have Visual Studio 2003 available, you should read [[Compiling the viewer (MSVS2003)|compiling with VS2003]] and you will get less trouble with it than with VS2005. &lt;br /&gt;
&lt;br /&gt;
The following explanation is adjusted for Viewer releases 1.16.0.5 or later.  See an [http://wiki.secondlife.com/w/index.php?title=Compiling_the_viewer_%28MSVS2005%29&amp;amp;oldid=22294 older version of this page] for the Viewer releases 1.15 or before.&lt;br /&gt;
&lt;br /&gt;
= Preparing the Development Environment =&lt;br /&gt;
&lt;br /&gt;
== Installing/Configuring VS2005 ==&lt;br /&gt;
&lt;br /&gt;
You need to setup the compiler and Microsoft Development tools as follows:&lt;br /&gt;
* Visual Studio 2005 &#039;&#039;&#039;&#039;&#039;-or-&#039;&#039;&#039;&#039;&#039; [http://msdn.microsoft.com/vstudio/express/visualc/download/ Visual C++ 2005 Express]&amp;lt;small&amp;gt;(Free)&amp;lt;/small&amp;gt; (Also, although not strictly necessary, eventually pick up and install SP1 for VS2005.)&lt;br /&gt;
* [http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;amp;displaylang=en Microsoft Platform SDK]&lt;br /&gt;
* A DirectX 9.0 SDK released on or after Summer of 2003 [http://download.microsoft.com/download/5/1/f/51ff8357-0af3-418b-9d0b-e9a5cdc39759/dxsdk_dec2006.EXE DirectX 9.0 SDK (December 2006)] [http://www.microsoft.com/downloads/details.aspx?FamilyID=9216652f-51e0-402e-b7b5-feb68d00f298&amp;amp;displaylang=en DirectX 9.0 SDK Update (Summer 2003)]&lt;br /&gt;
: &#039;&#039;&#039;Note&#039;&#039;&#039;: If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -&amp;gt; Add or Remove Programs) before installing this version.  Installing the new SDK &amp;quot;on top&amp;quot; of an older version may cause problems.&lt;br /&gt;
* Set up the project globals:&lt;br /&gt;
** Start Microsoft Visual Studio 2005&lt;br /&gt;
** Go to Tools &amp;gt; Options &amp;gt; Projects &amp;gt; VC++ Directories&lt;br /&gt;
** Make sure that the &#039;&#039;&#039;includes&#039;&#039;&#039; ([[:Image:MSVS2005 Global Project Options Include Files.JPG|&#039;&#039;&#039;screen shot&#039;&#039;&#039;]]) and &#039;&#039;&#039;libraries&#039;&#039;&#039; ([[:Image:MSVS2005 Global Project Options Library Files.JPG|&#039;&#039;&#039;screen shot&#039;&#039;&#039;]]) paths have the Platform SDK paths first, then the DirectX SDK paths, and then the Visual C++ paths. You may need to check &amp;quot;Show All Settings&amp;quot; at the bottom for VC++ Directories to show.&lt;br /&gt;
** If the DirectX SDK paths aren&#039;t present, add them to both &#039;&#039;&#039;includes&#039;&#039;&#039; and &#039;&#039;&#039;libraries&#039;&#039;&#039;.&lt;br /&gt;
*: Note: The newest DirectX SDK (&amp;quot;December 2006&amp;quot;) lib folder has two sub-folders, x64 and x86.  Make sure your path goes to one of them (select &#039;&#039;&#039;lib/x86&#039;&#039;&#039;, not just &#039;&#039;&#039;lib&#039;&#039;&#039;), or you will get a Link error.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting other Development Tools ==&lt;br /&gt;
You will also need some open source development tools.&lt;br /&gt;
* [http://www.cygwin.com/ Cygwin]&lt;br /&gt;
** When you run the cygwin setup utility make sure you have selected to install &#039;&#039;&#039;patchutils&#039;&#039;&#039;, &#039;&#039;&#039;flex&#039;&#039;&#039;, and &#039;&#039;&#039;bison&#039;&#039;&#039; (all located under &amp;quot;devel&amp;quot;) which are not part of the default install. The project files use several hardcoded references that expect Cygwin to be installed at &#039;&#039;&#039;C:\cygwin&#039;&#039;&#039;, if it&#039;s not you&#039;ll need to edit those references.&lt;br /&gt;
* [http://www.activestate.com/Products/ActivePython/?mp=1 ActivePython 2.3x or later] - Latest Version is 2.5.1.1&lt;br /&gt;
** It is required but can be avoided if you are compiling 1.18 or later viewers.  Either download and install or hack the prebuild.bat files as described in [http://jira.secondlife.com/browse/VWR-1267 VWR-1267].&lt;br /&gt;
* ActivePerl was recommended for previous versions on this Wiki, but it currently appears, that it is not strictly necessary unless you are planning to build your own version of all libraries (which most likely you don&#039;t want to do).  So for a start it may be safe to skip it.&lt;br /&gt;
*: [http://www.activestate.com/Products/ActivePerl/?mp=1 ActivePerl]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Downloading Source Code =&lt;br /&gt;
&lt;br /&gt;
You can download the Viewer source codes on the [[source downloads]] page.  You can also use a [[version control repository]].&lt;br /&gt;
&lt;br /&gt;
At a minimum, grab the source package and the artwork package, but for a start, also grab the library archive.  Many of the libraries can either be compiled from source or downloaded from other sites (see below), but this will take hours and thus it is easiest to also get the package with libraries compiled by the Lindens.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039;&lt;br /&gt;
* If the directory path you keep the SL source in has a space in it, the batch file that copies message_template.msg will fail. So, if you unzip or checkout the source tree into, e.g., &amp;quot;C:\Projects\Dir with space in name\Etc\linden&amp;quot;, it won&#039;t work!&lt;br /&gt;
* You should also avoid using non-ASCII (national) characters in the paths, although some localized versions of the tool puts some as a default...&lt;br /&gt;
* Unzip or checkout your source tree into a directory that has as short full pathname as possible, since long paths cause some unexpected trouble during the build.&lt;br /&gt;
&lt;br /&gt;
In other words, the easiest way to get this working is to get &#039;&#039;source&#039;&#039;, &#039;&#039;artwork&#039;&#039; and &#039;&#039;libraries&#039;&#039; from the [[source downloads]] page and unpack them all into the same directory/folder, which ideally would be a folder in (or near) the root directory with a short name like &#039;&#039;sl_1_16_0_5&#039;&#039;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing Libraries =&lt;br /&gt;
&lt;br /&gt;
SL Viewer depends on some third party libraries.  Some of them are open source, some others are not.&lt;br /&gt;
&lt;br /&gt;
== Open Source Libraries ==&lt;br /&gt;
&lt;br /&gt;
You can download the pre-build open source libraries from LL.  They are available on [[source downloads]] page.  Unzip them into your SL viewer source code directory, maintaining the same directory structure.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: The VS2003 libraries provided in the [[source downloads]] do not fully work with VS2005 compiled binaries. They will compile with the viewer under VS2005, but the VS2003 libraries are not fully STL compliant. The differences of [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrfnonstandardbehavior.asp non-standard behavior in MSVS] are the known cause.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alternatively, it may be possible to get the source files for the libraries and build by yourself.  See [[Compiling the viewer libraries (MSVS 2003)|the instruction for VS2003 users]] if you try it.  Please note, however, it is not known that VS2005 can successfully compile the libraries.  &#039;&#039;&#039;You have been warned.&#039;&#039;&#039;  (If you can make it, please write the info on this wiki...)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proprietary Libraries ==&lt;br /&gt;
&lt;br /&gt;
Lindens does not inlcude the following proprietary libraries.  You will need to follow the instructions to acquire below and copy them to the source path.&lt;br /&gt;
&lt;br /&gt;
However, it probably is a good idea to build an empty directory tree for the files below and first copy the files there and once completed, copy the whole tree to the actual source folder (like &#039;&#039;XCOPY OLIB SL_1_16_0_5 /S&#039;&#039;).  The reason is, that these steps are cumbersome and will have to be repeated for each new release (at least if you keep the source for each release in it&#039;s own folder).  If you do not want to do this, of course you can just copy the files directly into the linden source paths.&lt;br /&gt;
&lt;br /&gt;
 rem OLIBS.CMD to build a folder tree for 3rd party libraries and includes&lt;br /&gt;
 md olibs&lt;br /&gt;
 md olibs\linden\&lt;br /&gt;
 md olibs\linden\libraries&lt;br /&gt;
 md olibs\linden\libraries\include&lt;br /&gt;
 md olibs\linden\libraries\i686-win32&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\lib_release&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\lib_debug&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include\GL&lt;br /&gt;
 md olibs\linden\libraries\i686-win32\include\quicktime&lt;br /&gt;
 md olibs\linden\indra&lt;br /&gt;
 md olibs\linden\indra\newview&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Fmod ===&lt;br /&gt;
* Download &amp;amp; extract [http://www.fmod.org/index.php/download fmod 3.75 api for win32] (later versions, like FMOD Ex, are incompatible).&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\inc\fmod.h&amp;quot; to &amp;quot;linden\libraries\include&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\inc\fmod_errors.h&amp;quot; to &amp;quot;linden\libraries\include&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\lib\fmodvc.lib&amp;quot; to &amp;quot;linden\libraries\i686-win32\lib_release&amp;quot; and to &amp;quot;linden\libraries\i686-win32\lib_debug&amp;quot;&lt;br /&gt;
* Copy &amp;quot;fmodapi375win\api\fmod.dll&amp;quot; to &amp;quot;linden\indra\newview&amp;quot;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenGL ===&lt;br /&gt;
* Download [http://oss.sgi.com/projects/ogl-sample/sdk.html glext.h, glxext.h, and wglext.h]&lt;br /&gt;
* Copy them to &amp;quot;linden\libraries\i686-win32\include\GL&amp;quot;&lt;br /&gt;
* You don&#039;t need any additional *.lib or *.dll for OpenGL.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Quicktime &#039;&#039;(optional)&#039;&#039; ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This download requires a registration at the Apple Quicktime website and take a bit of time.  You can avoid using QuickTime if you want, bee [[#QuickTime removal|below]] for details.  Remember that your viewer &#039;&#039;&#039;can&#039;t play in-world movies&#039;&#039;&#039; if you do so.&lt;br /&gt;
* Download &amp;amp; install the [http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/203/wa/getSoftware?fileID=20525&amp;amp;code=y&amp;amp;source=x&amp;amp;wosid=4h16WcyMtVfd2P1EffGafkoxFcr Quicktime SDK for Windows]&lt;br /&gt;
* Copy &amp;quot;QuicktimeSDK\Libraries\QTMLClient.lib&amp;quot; to &amp;quot;linden\libraries\i686-win32\lib_release&amp;quot; and to  &amp;quot;linden\libraries\i686-win32\lib_debug&amp;quot;.&lt;br /&gt;
* Copy the contents of &amp;quot;QuicktimeSDK\CIncludes&amp;quot; into &amp;quot;linden\libraries\i686-win32\include\quicktime&amp;quot;.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Configuring for VS2005 =&lt;br /&gt;
&lt;br /&gt;
Lindens use VS2003 to develop the viewer.  &lt;br /&gt;
&lt;br /&gt;
You either need to convert &#039;&#039;solution file&#039;&#039; and &#039;&#039;project files&#039;&#039; from VS2003 format to VS2005 format or obtain files compatible with VS2005.  You may also need to modify source files to work around the incompatibility between VS2003 and VS2005.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: linden\indra\indra_complete_vs8.sln is a solution file already included in the source archive and intended for the Visual Studio 2005, but it &#039;&#039;&#039;does not work&#039;&#039;&#039; (at least between 1.14.0 and 1.17.0.9 distribution).  This may change in a future release, if Lindens include an updated versions of the &#039;&#039;&#039;_vc8&#039;&#039;&#039; files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Using pre-built solution/project files ==&lt;br /&gt;
&lt;br /&gt;
Currently there is a ZIP file with solution/project files available on the [https://jira.secondlife.com/browse/VWR-1151 JIRA bug tracker issue VWR-1151].  &lt;br /&gt;
&lt;br /&gt;
If you are building 1.16 or later, the easiest way towards compiling SL on MS2005 will be to use the zip file mentioned above.  The details is as follows:&lt;br /&gt;
* Download the appropriate ZIP archive from JIRA.&lt;br /&gt;
* Unpack it and copy it onto your linden source tree (allow to overwrite files that have &#039;&#039;&#039;_vc8&#039;&#039;&#039; in the name).&lt;br /&gt;
* Start Visual Studio 2005 (or VC++ Express).&lt;br /&gt;
* Use &amp;quot;File &amp;gt; Open &amp;gt; Project/Solution&amp;quot; to open the linden\indra\indra_complete\indra_complete&#039;&#039;&#039;_vc8&#039;&#039;&#039;.sln (Note: If you plan to work with multiple versions over time, you will find it useful to rename &#039;&#039;&#039;indra_complete_vc8.sln&#039;&#039;&#039; to something which contains the version number, e.g. &#039;&#039;&#039;indra_1_17_0_11_vc8.sln&#039;&#039;&#039; before opening.)&lt;br /&gt;
* Right click &#039;&#039;&#039;newview&#039;&#039;&#039; in the frame Solution Explorer and click &amp;quot;Set as StartUp Project&amp;quot;.&lt;br /&gt;
* Proceed with applying the &#039;&#039;&#039;Workarounds&#039;&#039;&#039; below (skip &#039;&#039;&#039;Manual conversion&#039;&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The solution/project files depends on the viewer release version.  If you are compiling some specific version of the viewer, and the {{JIRA|VWR-1151}} doesn&#039;t list the zip file for you version, you can try using the most close one.  If, while compiling, you later encounter errors or problems regarding the projects, you may have to do the manual conversion instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual conversion of the solution/projects ==&lt;br /&gt;
&lt;br /&gt;
If you can not find a set of project files (see above), there are instructions available how to manually do it: [[Converting_project_files_for_MSVS2005]] (this step will take about 5-15 minutes, depending on how proficient you are using VS2005).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workarounds ==&lt;br /&gt;
&lt;br /&gt;
There are more compatibility problems between VS2003 and VS2005.  You need the following code edits.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== test project/crash_logger/updater ===&lt;br /&gt;
&lt;br /&gt;
For whatever reason, the &#039;&#039;&#039;test&#039;&#039;&#039; project doesn&#039;t work under VS2005.  Workaround is to disable it as follows: Right click on the &#039;&#039;&#039;test&#039;&#039;&#039; and choose &#039;&#039;&#039;Unload Project&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you do not plan to create a full download build, you can exclude the &#039;&#039;&#039;win_crash_logger&#039;&#039;&#039; and &#039;&#039;&#039;win_updater&#039;&#039;&#039; from newview&#039;s project dependencies and unload them also.  But be careful with unloading these projects without removing them from the dependencies, because I have seen VS2005 act highly erratic while linking then project when I tried this.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== QuickTime removal ===&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to get Apple QuickTime SDK, you can disable it as follows:&lt;br /&gt;
*linden\indra\llcommon\llpreprocessor.h - near line 58 (the line below &#039;&#039;&#039;#elif LL_WINDOWS&#039;&#039;&#039;)&lt;br /&gt;
 --50: #define LL_QUICKTIME_ENABLED	1&lt;br /&gt;
 ++50: #define LL_QUICKTIME_ENABLED	&#039;&#039;&#039;&#039;&#039;0&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Pick &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; in the Solution Configurations drop-down box beside the green arrow under the tool bar, and do the followings on the Solution Explorer frame:&lt;br /&gt;
*Click &#039;&#039;&#039;newview&#039;&#039;&#039; to select it alone.&lt;br /&gt;
**Choose Properties.&lt;br /&gt;
**Under Configuration Properties &amp;gt; Linker &amp;gt; Input, click &#039;&#039;&#039;Additional Dependencies&#039;&#039;&#039; on the right to show a button labeled &amp;quot;&#039;&#039;&#039;...&#039;&#039;&#039;&amp;quot; on it at the very right on the line, then click the &#039;&#039;&#039;...&#039;&#039;&#039; button.&lt;br /&gt;
**Scroll down the list to find &#039;&#039;&#039;qtmlclient.lib&#039;&#039;&#039;.  Delete this single line.&lt;br /&gt;
**Click &#039;&#039;&#039;OK&#039;&#039;&#039; to close the &amp;quot;Additional Dependencies&amp;quot; dialog, then click OK again to close the &amp;quot;newview Property Pages&amp;quot; dialog box.&lt;br /&gt;
* Pick &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; in the Solution Configurations drop-down box. Click &#039;&#039;&#039;newview&#039;&#039;&#039; to select it alone and do the same thing again.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Ready, Set, Build! =&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
* Build either &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; (for debugging) or &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; (for production code).&lt;br /&gt;
* To do this, pick either in the Solution Configurations drop-down box beside the green arrow under the tool bar.&lt;br /&gt;
* Make sure &#039;&#039;&#039;newview&#039;&#039;&#039; is set as the active project (otherwise set from newview&#039;s right-click menu).&lt;br /&gt;
* Select Build-Menu &amp;gt; Build Solution or press F7.&lt;br /&gt;
* newview_noopt.exe will be built in linden\indra\newview\ReleaseNoOpt or SecondLife.exe will be linden\indra\newview\ReleaseForDownload.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Common compile errors ==&lt;br /&gt;
* See [[Common compilation problems]] if you run into other errors while building.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Running ==&lt;br /&gt;
* You can run the viewer by &#039;&#039;&#039;Debug &amp;gt; Start Debugging&#039;&#039;&#039; or &#039;&#039;&#039;Debug &amp;gt; Start &amp;quot;Without Debugging&#039;&#039;&#039; in Visual Studio. &lt;br /&gt;
* To run it outside VS, create a shortcut to SecondLife.exe, and change the start location to linden\indra\newview\ (all the .dll will be found there.)&lt;br /&gt;
* Alternately copy the exe (possibly rename it) to your &amp;quot;c:\program files\second life&amp;quot; folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Debugging Info/Configurations ==&lt;br /&gt;
* Usually you will either use &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; or the &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; configuration.&lt;br /&gt;
* &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; (not optimized) compiles faster and has more debugging information, but this comes at a runtime penalty of about 50% of your FPS in busy areas, compared to ReleaseForDownload build.&lt;br /&gt;
* &#039;&#039;&#039;ReleaseForDownload&#039;&#039;&#039; also has debugging information and runs fine in the debugger (although at times you may miss access to some local variables).&lt;br /&gt;
* &#039;&#039;&#039;ReleaseNoOpt&#039;&#039;&#039; comes with a seperate debugging console window opens and stays open for the duration of your session, but you can access the same information also by pressing Shift+Ctrl+4 in the viewer (all builds).&lt;br /&gt;
* The debug console log can also be redirected to a file if you add &amp;quot;2&amp;gt;secondlife.log&amp;quot; to the command line (Newview, Properties, Debugging, Command line arguments).&lt;br /&gt;
* If you want to build a &#039;&#039;&#039;Debug&#039;&#039;&#039; configuration, see the specific section with compile instructions on [[Finding_leaks]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problems Running? ==&lt;br /&gt;
* &#039;&#039;&#039;Inventory errors&#039;&#039;&#039;: If you&#039;re getting errors while trying to load your inventory, try [[Help:Stuck logging in|clearing your cache and deleting other temporary files]].&lt;br /&gt;
* &#039;&#039;&#039;Missing smime3 DLL&#039;&#039;&#039;: Those are parts of the integrated web browser.  Copy &#039;smime3.dll&#039;, &#039;nss3.dll&#039;, &#039;softokn3.dll&#039;, and &#039;ssl3.dll&#039; files from your official client&#039;s main folder to &amp;quot;linden\indra\newview&amp;quot;.&lt;br /&gt;
* &#039;&#039;&#039;Can&#039;t connect&#039;&#039;&#039;: In the debug builds there is a selection box on the login screen to select the server to connect to.  &#039;&#039;&#039;Agni&#039;&#039;&#039; is the production grid, &#039;&#039;&#039;aditi&#039;&#039;&#039; is the beta grid.  (There seems to be a bug in this part of the code, you may have to make your selection, close the viewer and repoen it, before you can connect to the selected grid).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Submit Patches =&lt;br /&gt;
This is probably faaar down the road, but if you make changes to the source and want to submit them, see the page about [[Submitting patches|submitting patches]].&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31658</id>
		<title>Preparing Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31658"/>
		<updated>2007-09-15T20:27:19Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* Unified diff of all changed files in a folder tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OSWikiContribBox}}&lt;br /&gt;
&lt;br /&gt;
If you have a piece of source code (be it a fix, new feature, or optimization of existing code) submit the patches in a way that makes it easy for the Lindens to incorporate them into the source code.&lt;br /&gt;
&lt;br /&gt;
== Good Patch Practise ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The best way to think about patches is that the people who are reviewing and applying your patches are the bottleneck in the system.  If you can make it easier for us to understand and apply patches without lots of cleanup, we can spend more time reviewing and incorporating your work.&lt;br /&gt;
&lt;br /&gt;
===Before You Start===&lt;br /&gt;
&lt;br /&gt;
Check [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker] to see if the issue has been submitted and its status.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re going to write a patch, don&#039;t forget to sign and send in the [http://secondlifegrid.net/programs/open_source/submission contribution agreement].  The sooner you do that, the sooner we can accept your patch.&lt;br /&gt;
&lt;br /&gt;
=== Coding Standard ===&lt;br /&gt;
&lt;br /&gt;
Please read and follow the coding standard: [[Coding_standard|Second Life coding standard]]&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Please do not add issue numbers or your name to patches.  We have to remove these by hand.  Also, please be careful in how you add comments.  Bracketing a patch with comments like &amp;quot;// PATCH START&amp;quot; and &amp;quot;// PATCH END&amp;quot; does not add any information, and adds to the manual cleanup we have to do.&lt;br /&gt;
&lt;br /&gt;
If you want to make sure you get credited, then&lt;br /&gt;
add yourself to doc/contributions.txt as part of the patch.  That makes&lt;br /&gt;
it easier for people to see the exact nature of the changes you&#039;ve added.&lt;br /&gt;
&lt;br /&gt;
In short, just add to the patch what is expected to appear in the final source.&lt;br /&gt;
&lt;br /&gt;
=== One Patch for one Issue ===&lt;br /&gt;
&lt;br /&gt;
Each patch should do exactly one thing.  If you have three different bugs to fix, please submit three different patches.  When you fold unrelated hunks into a single patch, we have to try to figure out which part of the patch applies to which bug, and split it out by hand, sometimes into several patches.  Combo patches are particularly time consuming, and the manual splitting up makes it very easy to lose pieces of patches altogether.&lt;br /&gt;
&lt;br /&gt;
=== Less is more ===&lt;br /&gt;
&lt;br /&gt;
Smaller patches are easier to review and therefore more likely to be integrated quickly. The longer it takes for a patch to be incorporated, the higher the likelihood that the underlying code will change enough for the patch to fail. Please do not include formatting or other clean-up changes as that makes it harder to review and more likely to fail.&lt;br /&gt;
&lt;br /&gt;
=== Path structure ===&lt;br /&gt;
&lt;br /&gt;
It is not a must, but if your path structure permits, start the patch on the directory level where the linden folder resides, so that the path/file names in your patch will start with &#039;&#039;&#039;linden/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Give Yourself Credit! ===&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t be shy about adding the issue label to doc/contributions.txt and adding your name. We use this file for a number of purposes, including the generation of the [[Source contributions]] page.&lt;br /&gt;
&lt;br /&gt;
== Creating a Patch ==&lt;br /&gt;
&lt;br /&gt;
Patches should be submitted in unified diff format.  This format is similar to simple diffs, but with more detailed information, and it can be automatically integrated into the source.  You can generate a unified diff by calling &#039;&#039;diff -u &amp;lt;original file&amp;gt; &amp;lt;new file&amp;gt;&#039;&#039; (under Windows you will find the diff command as part of the CygWin project in C:\CYGWIN\BIN).&lt;br /&gt;
&lt;br /&gt;
Please submit a single plain text uncompressed patch file that affects all of the files you need to modify.  This is far easier to review than a collection of tiny one-file patches.  &lt;br /&gt;
&lt;br /&gt;
Also bad for reviewability are a compressed patch, or a tarball or zip containing one or more patches.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Unified diff of all changed files in a folder tree ===&lt;br /&gt;
The easiest way to generate a clean patch is to keep two copies of the source tree.  Leave one completely unmodified, and make all of your changes in the second.  Then use &amp;quot;diff -urN&amp;quot; to generate the patch.  You can use the --exclude option to omit unwanted files.  For example:&lt;br /&gt;
&lt;br /&gt;
 diff -urN --exclude=&amp;quot;*.o&amp;quot; my_untouched_tree my_modified_tree&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unified diff of multiple files ===&lt;br /&gt;
If for any reason you can not use a whole tree diff as above, you can still merge patches from different files into one, by appending the output of patch commands to the previous output (via &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039; redirection for the 2nd and later commands).&lt;br /&gt;
&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.cpp linden/indra/newview/viewer.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/llviewerwindow.cpp linden/indra/newview/llviewerwindow.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CR/LF vs LF and Whitespace===&lt;br /&gt;
In some situations, you will find that the patch contains the whole file, rather than just the lines changed.  The reason is that sometimes, files in Linux format find their way into the source distribution.  With these diff.exe will treat all lines as different from those in your modified file.&lt;br /&gt;
&lt;br /&gt;
There are various options that will help here.  You can add &#039;&#039;--strip-trailing-cr&#039;&#039; to the command line to fix this.  &lt;br /&gt;
&lt;br /&gt;
  diff -u --strip-trailing-cr linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt &lt;br /&gt;
&lt;br /&gt;
In some situations try the &#039;&#039;&#039;w&#039;&#039;&#039; (ignore whitespace) and/or &#039;&#039;&#039;B&#039;&#039;&#039; (ignore empty lines) options are also helpful (e.g. with tabs vs. space or spurious space characters while editing).   Type &#039;&#039;&#039;diff --help&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Sample output ===&lt;br /&gt;
For reference, here&#039;s what a unified diff looks like.&lt;br /&gt;
&lt;br /&gt;
 --- linden-untouched/indra/newview/viewer.cpp    2007-05-14 16:47:26.000000000 +0200&lt;br /&gt;
 +++ linden/indra/newview/viewer.cpp 2007-05-22 08:49:50.484375000 +0200&lt;br /&gt;
 @@ -6302,7 +6326,7 @@&lt;br /&gt;
 &lt;br /&gt;
     llinfos &amp;lt;&amp;lt; &amp;quot;Cleaning Up&amp;quot; &amp;lt;&amp;lt; llendflush;&lt;br /&gt;
 &lt;br /&gt;
 -   LLKeyframeMotion::flushKeyframeCache();&lt;br /&gt;
 +   LLKeyframeMotion::flushKeyframeCache(TRUE); &lt;br /&gt;
 &lt;br /&gt;
     // Must clean up texture references before viewer window is destroyed.&lt;br /&gt;
     LLHUDObject::cleanupHUDObjects();&lt;br /&gt;
 @@ -6562,6 +6586,8 @@&lt;br /&gt;
     delete gVFS;&lt;br /&gt;
     gVFS = NULL;&lt;br /&gt;
 &lt;br /&gt;
 +   LLCurl::cleanup(); &lt;br /&gt;
 +&lt;br /&gt;
     // This will eventually be done in LLApp&lt;br /&gt;
     LLCommon::cleanupClass();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Submitting the Patch on JIRA ==&lt;br /&gt;
&lt;br /&gt;
When you are ready for the world to view your patch, submit the patch on the [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker].  Create a new issue or attach the patch to an existing entry as appropriate. Attach the &#039;&#039;.patch.txt&#039;&#039; file itself as a file attachment and make sure that the check mark for &#039;&#039;Patch attached&#039;&#039; is set (you can do that when creating the issue or by choosing Edit for an existing one).  Take a look at existing patches through the &#039;&#039;Issues with patches attached&#039;&#039; filter on the JIRA main page to get a general idea how it is done.&lt;br /&gt;
&lt;br /&gt;
With larger or sensitive patches it is a good idea to submit the patch for peer review on the [[Developer_communication_tools|mailing list]].  This way fellow developers can review the patch, uncover possible bugs, comment on undesired interactions or generally share ideas with you.&lt;br /&gt;
&lt;br /&gt;
Just subscribe to the mailing list, then write an email to the list with a link to the description of what it does in the text.&lt;br /&gt;
&lt;br /&gt;
Also, offer a description of the patch (the why and what) as a separate file and/or as a description or comment with the issue.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applying patches to your source ==&lt;br /&gt;
&lt;br /&gt;
In case you are interested, the application of other patches to your source is easy.  Assuming that you are at the directory level from where the patch references the files (usually in the folder where you see the &#039;&#039;&#039;linden&#039;&#039;&#039; folder), applying a patch can be done via:&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 -i changes.patch&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
  c:\cygwin\bin\patch -p 0 &amp;lt; changes.patch&lt;br /&gt;
&lt;br /&gt;
On your first attempts, you might also be interested in the &#039;&#039;&#039;--verbose&#039;&#039;&#039;, &#039;&#039;&#039;--backup&#039;&#039;&#039; or &#039;&#039;&#039;--dry-run&#039;&#039;&#039; (simulate patch) options.  See &#039;&#039;&#039;patch --help&#039;&#039;&#039; for details.&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 --verbose --backup --dry-run -i changes.patch&lt;br /&gt;
&lt;br /&gt;
Also, if a patch fails, look for files ending with &#039;&#039;&#039;.rej&#039;&#039;&#039; in the target folder.&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31657</id>
		<title>Preparing Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31657"/>
		<updated>2007-09-15T20:27:12Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* Creating a Patch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OSWikiContribBox}}&lt;br /&gt;
&lt;br /&gt;
If you have a piece of source code (be it a fix, new feature, or optimization of existing code) submit the patches in a way that makes it easy for the Lindens to incorporate them into the source code.&lt;br /&gt;
&lt;br /&gt;
== Good Patch Practise ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The best way to think about patches is that the people who are reviewing and applying your patches are the bottleneck in the system.  If you can make it easier for us to understand and apply patches without lots of cleanup, we can spend more time reviewing and incorporating your work.&lt;br /&gt;
&lt;br /&gt;
===Before You Start===&lt;br /&gt;
&lt;br /&gt;
Check [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker] to see if the issue has been submitted and its status.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re going to write a patch, don&#039;t forget to sign and send in the [http://secondlifegrid.net/programs/open_source/submission contribution agreement].  The sooner you do that, the sooner we can accept your patch.&lt;br /&gt;
&lt;br /&gt;
=== Coding Standard ===&lt;br /&gt;
&lt;br /&gt;
Please read and follow the coding standard: [[Coding_standard|Second Life coding standard]]&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Please do not add issue numbers or your name to patches.  We have to remove these by hand.  Also, please be careful in how you add comments.  Bracketing a patch with comments like &amp;quot;// PATCH START&amp;quot; and &amp;quot;// PATCH END&amp;quot; does not add any information, and adds to the manual cleanup we have to do.&lt;br /&gt;
&lt;br /&gt;
If you want to make sure you get credited, then&lt;br /&gt;
add yourself to doc/contributions.txt as part of the patch.  That makes&lt;br /&gt;
it easier for people to see the exact nature of the changes you&#039;ve added.&lt;br /&gt;
&lt;br /&gt;
In short, just add to the patch what is expected to appear in the final source.&lt;br /&gt;
&lt;br /&gt;
=== One Patch for one Issue ===&lt;br /&gt;
&lt;br /&gt;
Each patch should do exactly one thing.  If you have three different bugs to fix, please submit three different patches.  When you fold unrelated hunks into a single patch, we have to try to figure out which part of the patch applies to which bug, and split it out by hand, sometimes into several patches.  Combo patches are particularly time consuming, and the manual splitting up makes it very easy to lose pieces of patches altogether.&lt;br /&gt;
&lt;br /&gt;
=== Less is more ===&lt;br /&gt;
&lt;br /&gt;
Smaller patches are easier to review and therefore more likely to be integrated quickly. The longer it takes for a patch to be incorporated, the higher the likelihood that the underlying code will change enough for the patch to fail. Please do not include formatting or other clean-up changes as that makes it harder to review and more likely to fail.&lt;br /&gt;
&lt;br /&gt;
=== Path structure ===&lt;br /&gt;
&lt;br /&gt;
It is not a must, but if your path structure permits, start the patch on the directory level where the linden folder resides, so that the path/file names in your patch will start with &#039;&#039;&#039;linden/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Give Yourself Credit! ===&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t be shy about adding the issue label to doc/contributions.txt and adding your name. We use this file for a number of purposes, including the generation of the [[Source contributions]] page.&lt;br /&gt;
&lt;br /&gt;
== Creating a Patch ==&lt;br /&gt;
&lt;br /&gt;
Patches should be submitted in unified diff format.  This format is similar to simple diffs, but with more detailed information, and it can be automatically integrated into the source.  You can generate a unified diff by calling &#039;&#039;diff -u &amp;lt;original file&amp;gt; &amp;lt;new file&amp;gt;&#039;&#039; (under Windows you will find the diff command as part of the CygWin project in C:\CYGWIN\BIN).&lt;br /&gt;
&lt;br /&gt;
Please submit a single plain text uncompressed patch file that affects all of the files you need to modify.  This is far easier to review than a collection of tiny one-file patches.  &lt;br /&gt;
&lt;br /&gt;
Also bad for reviewability are a compressed patch, or a tarball or zip containing one or more patches.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Unified diff of all changed files in a folder tree ===&lt;br /&gt;
The easiest way to generate a clean patch is to keep two copies of the source tree.  Leave one completely unmodified, and make all of your changes in the second.  Then use &amp;quot;diff -urN&amp;quot; to generate the patch.  You can use the --exclude option to omit unwanted files.  For example:&lt;br /&gt;
&lt;br /&gt;
 diff -urN --exclude=&amp;quot;*.o&amp;quot; my_untouched_tree my_modified_tree&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Unified diff of multiple files ===&lt;br /&gt;
If for any reason you can not use a whole tree diff as above, you can still merge patches from different files into one, by appending the output of patch commands to the previous output (via &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039; redirection for the 2nd and later commands).&lt;br /&gt;
&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.cpp linden/indra/newview/viewer.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/llviewerwindow.cpp linden/indra/newview/llviewerwindow.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CR/LF vs LF and Whitespace===&lt;br /&gt;
In some situations, you will find that the patch contains the whole file, rather than just the lines changed.  The reason is that sometimes, files in Linux format find their way into the source distribution.  With these diff.exe will treat all lines as different from those in your modified file.&lt;br /&gt;
&lt;br /&gt;
There are various options that will help here.  You can add &#039;&#039;--strip-trailing-cr&#039;&#039; to the command line to fix this.  &lt;br /&gt;
&lt;br /&gt;
  diff -u --strip-trailing-cr linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt &lt;br /&gt;
&lt;br /&gt;
In some situations try the &#039;&#039;&#039;w&#039;&#039;&#039; (ignore whitespace) and/or &#039;&#039;&#039;B&#039;&#039;&#039; (ignore empty lines) options are also helpful (e.g. with tabs vs. space or spurious space characters while editing).   Type &#039;&#039;&#039;diff --help&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Sample output ===&lt;br /&gt;
For reference, here&#039;s what a unified diff looks like.&lt;br /&gt;
&lt;br /&gt;
 --- linden-untouched/indra/newview/viewer.cpp    2007-05-14 16:47:26.000000000 +0200&lt;br /&gt;
 +++ linden/indra/newview/viewer.cpp 2007-05-22 08:49:50.484375000 +0200&lt;br /&gt;
 @@ -6302,7 +6326,7 @@&lt;br /&gt;
 &lt;br /&gt;
     llinfos &amp;lt;&amp;lt; &amp;quot;Cleaning Up&amp;quot; &amp;lt;&amp;lt; llendflush;&lt;br /&gt;
 &lt;br /&gt;
 -   LLKeyframeMotion::flushKeyframeCache();&lt;br /&gt;
 +   LLKeyframeMotion::flushKeyframeCache(TRUE); &lt;br /&gt;
 &lt;br /&gt;
     // Must clean up texture references before viewer window is destroyed.&lt;br /&gt;
     LLHUDObject::cleanupHUDObjects();&lt;br /&gt;
 @@ -6562,6 +6586,8 @@&lt;br /&gt;
     delete gVFS;&lt;br /&gt;
     gVFS = NULL;&lt;br /&gt;
 &lt;br /&gt;
 +   LLCurl::cleanup(); &lt;br /&gt;
 +&lt;br /&gt;
     // This will eventually be done in LLApp&lt;br /&gt;
     LLCommon::cleanupClass();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Submitting the Patch on JIRA ==&lt;br /&gt;
&lt;br /&gt;
When you are ready for the world to view your patch, submit the patch on the [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker].  Create a new issue or attach the patch to an existing entry as appropriate. Attach the &#039;&#039;.patch.txt&#039;&#039; file itself as a file attachment and make sure that the check mark for &#039;&#039;Patch attached&#039;&#039; is set (you can do that when creating the issue or by choosing Edit for an existing one).  Take a look at existing patches through the &#039;&#039;Issues with patches attached&#039;&#039; filter on the JIRA main page to get a general idea how it is done.&lt;br /&gt;
&lt;br /&gt;
With larger or sensitive patches it is a good idea to submit the patch for peer review on the [[Developer_communication_tools|mailing list]].  This way fellow developers can review the patch, uncover possible bugs, comment on undesired interactions or generally share ideas with you.&lt;br /&gt;
&lt;br /&gt;
Just subscribe to the mailing list, then write an email to the list with a link to the description of what it does in the text.&lt;br /&gt;
&lt;br /&gt;
Also, offer a description of the patch (the why and what) as a separate file and/or as a description or comment with the issue.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applying patches to your source ==&lt;br /&gt;
&lt;br /&gt;
In case you are interested, the application of other patches to your source is easy.  Assuming that you are at the directory level from where the patch references the files (usually in the folder where you see the &#039;&#039;&#039;linden&#039;&#039;&#039; folder), applying a patch can be done via:&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 -i changes.patch&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
  c:\cygwin\bin\patch -p 0 &amp;lt; changes.patch&lt;br /&gt;
&lt;br /&gt;
On your first attempts, you might also be interested in the &#039;&#039;&#039;--verbose&#039;&#039;&#039;, &#039;&#039;&#039;--backup&#039;&#039;&#039; or &#039;&#039;&#039;--dry-run&#039;&#039;&#039; (simulate patch) options.  See &#039;&#039;&#039;patch --help&#039;&#039;&#039; for details.&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 --verbose --backup --dry-run -i changes.patch&lt;br /&gt;
&lt;br /&gt;
Also, if a patch fails, look for files ending with &#039;&#039;&#039;.rej&#039;&#039;&#039; in the target folder.&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31660</id>
		<title>Preparing Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31660"/>
		<updated>2007-09-15T20:24:42Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* Submitting the Patch on JIRA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OSWikiContribBox}}&lt;br /&gt;
&lt;br /&gt;
If you have a piece of source code (be it a fix, new feature, or optimization of existing code) submit the patches in a way that makes it easy for the Lindens to incorporate them into the source code.&lt;br /&gt;
&lt;br /&gt;
== Good Patch Practise ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The best way to think about patches is that the people who are reviewing and applying your patches are the bottleneck in the system.  If you can make it easier for us to understand and apply patches without lots of cleanup, we can spend more time reviewing and incorporating your work.&lt;br /&gt;
&lt;br /&gt;
===Before You Start===&lt;br /&gt;
&lt;br /&gt;
Check [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker] to see if the issue has been submitted and its status.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re going to write a patch, don&#039;t forget to sign and send in the [http://secondlifegrid.net/programs/open_source/submission contribution agreement].  The sooner you do that, the sooner we can accept your patch.&lt;br /&gt;
&lt;br /&gt;
=== Coding Standard ===&lt;br /&gt;
&lt;br /&gt;
Please read and follow the coding standard: [[Coding_standard|Second Life coding standard]]&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Please do not add issue numbers or your name to patches.  We have to remove these by hand.  Also, please be careful in how you add comments.  Bracketing a patch with comments like &amp;quot;// PATCH START&amp;quot; and &amp;quot;// PATCH END&amp;quot; does not add any information, and adds to the manual cleanup we have to do.&lt;br /&gt;
&lt;br /&gt;
If you want to make sure you get credited, then&lt;br /&gt;
add yourself to doc/contributions.txt as part of the patch.  That makes&lt;br /&gt;
it easier for people to see the exact nature of the changes you&#039;ve added.&lt;br /&gt;
&lt;br /&gt;
In short, just add to the patch what is expected to appear in the final source.&lt;br /&gt;
&lt;br /&gt;
=== One Patch for one Issue ===&lt;br /&gt;
&lt;br /&gt;
Each patch should do exactly one thing.  If you have three different bugs to fix, please submit three different patches.  When you fold unrelated hunks into a single patch, we have to try to figure out which part of the patch applies to which bug, and split it out by hand, sometimes into several patches.  Combo patches are particularly time consuming, and the manual splitting up makes it very easy to lose pieces of patches altogether.&lt;br /&gt;
&lt;br /&gt;
=== Less is more ===&lt;br /&gt;
&lt;br /&gt;
Smaller patches are easier to review and therefore more likely to be integrated quickly. The longer it takes for a patch to be incorporated, the higher the likelihood that the underlying code will change enough for the patch to fail. Please do not include formatting or other clean-up changes as that makes it harder to review and more likely to fail.&lt;br /&gt;
&lt;br /&gt;
=== Path structure ===&lt;br /&gt;
&lt;br /&gt;
It is not a must, but if your path structure permits, start the patch on the directory level where the linden folder resides, so that the path/file names in your patch will start with &#039;&#039;&#039;linden/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Give Yourself Credit! ===&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t be shy about adding the issue label to doc/contributions.txt and adding your name. We use this file for a number of purposes, including the generation of the [[Source contributions]] page.&lt;br /&gt;
&lt;br /&gt;
== Creating a Patch ==&lt;br /&gt;
&lt;br /&gt;
Patches should be submitted in unified diff format.  This format is similar to simple diffs, but with more detailed information, and it can be automatically integrated into the source.  You can generate a unified diff by calling &#039;&#039;diff -u &amp;lt;original file&amp;gt; &amp;lt;new file&amp;gt;&#039;&#039; (under Windows you will find the diff command as part of the CygWin project in C:\CYGWIN\BIN).&lt;br /&gt;
&lt;br /&gt;
Please submit a single plain text uncompressed patch file that affects all of the files you need to modify.  This is far easier to review than a collection of tiny one-file patches.  &lt;br /&gt;
&lt;br /&gt;
Also bad for reviewability are a compressed patch, or a tarball or zip containing one or more patches.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Unified diff of all changed files in a folder tree ===&lt;br /&gt;
The easiest way to generate a clean patch is to keep two copies of the source tree.  Leave one completely unmodified, and make all of your changes in the second.  Then use &amp;quot;diff -urN&amp;quot; to generate the patch.  You can use the --exclude option to omit unwanted files.  For example:&lt;br /&gt;
&lt;br /&gt;
 diff -urN --exclude=&amp;quot;*.o&amp;quot; my_untouched_tree my_modified_tree&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unified diff of multiple files ===&lt;br /&gt;
If for any reason you can not use a whole tree diff as above, you can still merge patches from different files into one, by appending the output of patch commands to the previous output (via &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039; redirection for the 2nd and later commands).&lt;br /&gt;
&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.cpp linden/indra/newview/viewer.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/llviewerwindow.cpp linden/indra/newview/llviewerwindow.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CR/LF vs LF and Whitespace===&lt;br /&gt;
In some situations, you will find that the patch contains the whole file, rather than just the lines changed.  The reason is that sometimes, files in Linux format find their way into the source distribution.  With these diff.exe will treat all lines as different from those in your modified file.&lt;br /&gt;
&lt;br /&gt;
There are various options that will help here.  You can add &#039;&#039;--strip-trailing-cr&#039;&#039; to the command line to fix this.  &lt;br /&gt;
&lt;br /&gt;
  diff -u --strip-trailing-cr linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt &lt;br /&gt;
&lt;br /&gt;
In some situations try the &#039;&#039;&#039;w&#039;&#039;&#039; (ignore whitespace) and/or &#039;&#039;&#039;B&#039;&#039;&#039; (ignore empty lines) options are also helpful (e.g. with tabs vs. space or spurious space characters while editing).   Type &#039;&#039;&#039;diff --help&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample output ===&lt;br /&gt;
For reference, here&#039;s what a unified diff looks like.&lt;br /&gt;
&lt;br /&gt;
 --- linden-untouched/indra/newview/viewer.cpp    2007-05-14 16:47:26.000000000 +0200&lt;br /&gt;
 +++ linden/indra/newview/viewer.cpp 2007-05-22 08:49:50.484375000 +0200&lt;br /&gt;
 @@ -6302,7 +6326,7 @@&lt;br /&gt;
 &lt;br /&gt;
     llinfos &amp;lt;&amp;lt; &amp;quot;Cleaning Up&amp;quot; &amp;lt;&amp;lt; llendflush;&lt;br /&gt;
 &lt;br /&gt;
 -   LLKeyframeMotion::flushKeyframeCache();&lt;br /&gt;
 +   LLKeyframeMotion::flushKeyframeCache(TRUE); &lt;br /&gt;
 &lt;br /&gt;
     // Must clean up texture references before viewer window is destroyed.&lt;br /&gt;
     LLHUDObject::cleanupHUDObjects();&lt;br /&gt;
 @@ -6562,6 +6586,8 @@&lt;br /&gt;
     delete gVFS;&lt;br /&gt;
     gVFS = NULL;&lt;br /&gt;
 &lt;br /&gt;
 +   LLCurl::cleanup(); &lt;br /&gt;
 +&lt;br /&gt;
     // This will eventually be done in LLApp&lt;br /&gt;
     LLCommon::cleanupClass();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Submitting the Patch on JIRA ==&lt;br /&gt;
&lt;br /&gt;
When you are ready for the world to view your patch, submit the patch on the [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker].  Create a new issue or attach the patch to an existing entry as appropriate. Attach the &#039;&#039;.patch.txt&#039;&#039; file itself as a file attachment and make sure that the check mark for &#039;&#039;Patch attached&#039;&#039; is set (you can do that when creating the issue or by choosing Edit for an existing one).  Take a look at existing patches through the &#039;&#039;Issues with patches attached&#039;&#039; filter on the JIRA main page to get a general idea how it is done.&lt;br /&gt;
&lt;br /&gt;
With larger or sensitive patches it is a good idea to submit the patch for peer review on the [[Developer_communication_tools|mailing list]].  This way fellow developers can review the patch, uncover possible bugs, comment on undesired interactions or generally share ideas with you.&lt;br /&gt;
&lt;br /&gt;
Just subscribe to the mailing list, then write an email to the list with a link to the description of what it does in the text.&lt;br /&gt;
&lt;br /&gt;
Also, offer a description of the patch (the why and what) as a separate file and/or as a description or comment with the issue.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
== Applying patches to your source ==&lt;br /&gt;
&lt;br /&gt;
In case you are interested, the application of other patches to your source is easy.  Assuming that you are at the directory level from where the patch references the files (usually in the folder where you see the &#039;&#039;&#039;linden&#039;&#039;&#039; folder), applying a patch can be done via:&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 -i changes.patch&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
  c:\cygwin\bin\patch -p 0 &amp;lt; changes.patch&lt;br /&gt;
&lt;br /&gt;
On your first attempts, you might also be interested in the &#039;&#039;&#039;--verbose&#039;&#039;&#039;, &#039;&#039;&#039;--backup&#039;&#039;&#039; or &#039;&#039;&#039;--dry-run&#039;&#039;&#039; (simulate patch) options.  See &#039;&#039;&#039;patch --help&#039;&#039;&#039; for details.&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 --verbose --backup --dry-run -i changes.patch&lt;br /&gt;
&lt;br /&gt;
Also, if a patch fails, look for files ending with &#039;&#039;&#039;.rej&#039;&#039;&#039; in the target folder.&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31659</id>
		<title>Preparing Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Preparing_Code&amp;diff=31659"/>
		<updated>2007-09-15T20:24:31Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: /* CR/LF vs LF and Whitespace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OSWikiContribBox}}&lt;br /&gt;
&lt;br /&gt;
If you have a piece of source code (be it a fix, new feature, or optimization of existing code) submit the patches in a way that makes it easy for the Lindens to incorporate them into the source code.&lt;br /&gt;
&lt;br /&gt;
== Good Patch Practise ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
The best way to think about patches is that the people who are reviewing and applying your patches are the bottleneck in the system.  If you can make it easier for us to understand and apply patches without lots of cleanup, we can spend more time reviewing and incorporating your work.&lt;br /&gt;
&lt;br /&gt;
===Before You Start===&lt;br /&gt;
&lt;br /&gt;
Check [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker] to see if the issue has been submitted and its status.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re going to write a patch, don&#039;t forget to sign and send in the [http://secondlifegrid.net/programs/open_source/submission contribution agreement].  The sooner you do that, the sooner we can accept your patch.&lt;br /&gt;
&lt;br /&gt;
=== Coding Standard ===&lt;br /&gt;
&lt;br /&gt;
Please read and follow the coding standard: [[Coding_standard|Second Life coding standard]]&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Please do not add issue numbers or your name to patches.  We have to remove these by hand.  Also, please be careful in how you add comments.  Bracketing a patch with comments like &amp;quot;// PATCH START&amp;quot; and &amp;quot;// PATCH END&amp;quot; does not add any information, and adds to the manual cleanup we have to do.&lt;br /&gt;
&lt;br /&gt;
If you want to make sure you get credited, then&lt;br /&gt;
add yourself to doc/contributions.txt as part of the patch.  That makes&lt;br /&gt;
it easier for people to see the exact nature of the changes you&#039;ve added.&lt;br /&gt;
&lt;br /&gt;
In short, just add to the patch what is expected to appear in the final source.&lt;br /&gt;
&lt;br /&gt;
=== One Patch for one Issue ===&lt;br /&gt;
&lt;br /&gt;
Each patch should do exactly one thing.  If you have three different bugs to fix, please submit three different patches.  When you fold unrelated hunks into a single patch, we have to try to figure out which part of the patch applies to which bug, and split it out by hand, sometimes into several patches.  Combo patches are particularly time consuming, and the manual splitting up makes it very easy to lose pieces of patches altogether.&lt;br /&gt;
&lt;br /&gt;
=== Less is more ===&lt;br /&gt;
&lt;br /&gt;
Smaller patches are easier to review and therefore more likely to be integrated quickly. The longer it takes for a patch to be incorporated, the higher the likelihood that the underlying code will change enough for the patch to fail. Please do not include formatting or other clean-up changes as that makes it harder to review and more likely to fail.&lt;br /&gt;
&lt;br /&gt;
=== Path structure ===&lt;br /&gt;
&lt;br /&gt;
It is not a must, but if your path structure permits, start the patch on the directory level where the linden folder resides, so that the path/file names in your patch will start with &#039;&#039;&#039;linden/&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Give Yourself Credit! ===&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t be shy about adding the issue label to doc/contributions.txt and adding your name. We use this file for a number of purposes, including the generation of the [[Source contributions]] page.&lt;br /&gt;
&lt;br /&gt;
== Creating a Patch ==&lt;br /&gt;
&lt;br /&gt;
Patches should be submitted in unified diff format.  This format is similar to simple diffs, but with more detailed information, and it can be automatically integrated into the source.  You can generate a unified diff by calling &#039;&#039;diff -u &amp;lt;original file&amp;gt; &amp;lt;new file&amp;gt;&#039;&#039; (under Windows you will find the diff command as part of the CygWin project in C:\CYGWIN\BIN).&lt;br /&gt;
&lt;br /&gt;
Please submit a single plain text uncompressed patch file that affects all of the files you need to modify.  This is far easier to review than a collection of tiny one-file patches.  &lt;br /&gt;
&lt;br /&gt;
Also bad for reviewability are a compressed patch, or a tarball or zip containing one or more patches.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
=== Unified diff of all changed files in a folder tree ===&lt;br /&gt;
The easiest way to generate a clean patch is to keep two copies of the source tree.  Leave one completely unmodified, and make all of your changes in the second.  Then use &amp;quot;diff -urN&amp;quot; to generate the patch.  You can use the --exclude option to omit unwanted files.  For example:&lt;br /&gt;
&lt;br /&gt;
 diff -urN --exclude=&amp;quot;*.o&amp;quot; my_untouched_tree my_modified_tree&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unified diff of multiple files ===&lt;br /&gt;
If for any reason you can not use a whole tree diff as above, you can still merge patches from different files into one, by appending the output of patch commands to the previous output (via &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039; redirection for the 2nd and later commands).&lt;br /&gt;
&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/viewer.cpp linden/indra/newview/viewer.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
 diff -u linden-untouched/indra/newview/llviewerwindow.cpp linden/indra/newview/llviewerwindow.cpp &#039;&#039;&#039;&amp;gt;&amp;gt;&#039;&#039;&#039;mychanges.patch.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CR/LF vs LF and Whitespace===&lt;br /&gt;
In some situations, you will find that the patch contains the whole file, rather than just the lines changed.  The reason is that sometimes, files in Linux format find their way into the source distribution.  With these diff.exe will treat all lines as different from those in your modified file.&lt;br /&gt;
&lt;br /&gt;
There are various options that will help here.  You can add &#039;&#039;--strip-trailing-cr&#039;&#039; to the command line to fix this.  &lt;br /&gt;
&lt;br /&gt;
  diff -u --strip-trailing-cr linden-untouched/indra/newview/viewer.h linden/indra/newview/viewer.h &amp;gt;mychanges.patch.txt &lt;br /&gt;
&lt;br /&gt;
In some situations try the &#039;&#039;&#039;w&#039;&#039;&#039; (ignore whitespace) and/or &#039;&#039;&#039;B&#039;&#039;&#039; (ignore empty lines) options are also helpful (e.g. with tabs vs. space or spurious space characters while editing).   Type &#039;&#039;&#039;diff --help&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sample output ===&lt;br /&gt;
For reference, here&#039;s what a unified diff looks like.&lt;br /&gt;
&lt;br /&gt;
 --- linden-untouched/indra/newview/viewer.cpp    2007-05-14 16:47:26.000000000 +0200&lt;br /&gt;
 +++ linden/indra/newview/viewer.cpp 2007-05-22 08:49:50.484375000 +0200&lt;br /&gt;
 @@ -6302,7 +6326,7 @@&lt;br /&gt;
 &lt;br /&gt;
     llinfos &amp;lt;&amp;lt; &amp;quot;Cleaning Up&amp;quot; &amp;lt;&amp;lt; llendflush;&lt;br /&gt;
 &lt;br /&gt;
 -   LLKeyframeMotion::flushKeyframeCache();&lt;br /&gt;
 +   LLKeyframeMotion::flushKeyframeCache(TRUE); &lt;br /&gt;
 &lt;br /&gt;
     // Must clean up texture references before viewer window is destroyed.&lt;br /&gt;
     LLHUDObject::cleanupHUDObjects();&lt;br /&gt;
 @@ -6562,6 +6586,8 @@&lt;br /&gt;
     delete gVFS;&lt;br /&gt;
     gVFS = NULL;&lt;br /&gt;
 &lt;br /&gt;
 +   LLCurl::cleanup(); &lt;br /&gt;
 +&lt;br /&gt;
     // This will eventually be done in LLApp&lt;br /&gt;
     LLCommon::cleanupClass();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Submitting the Patch on JIRA ==&lt;br /&gt;
&lt;br /&gt;
When you are ready for the world to view your patch, submit the patch on the [https://jira.secondlife.com/secure/Dashboard.jspa| JIRA Bug Tracker].  Create a new issue or attach the patch to an existing entry as appropriate. Attach the &#039;&#039;.patch.txt&#039;&#039; file itself as a file attachment and make sure that the check mark for &#039;&#039;Patch attached&#039;&#039; is set (you can do that when creating the issue or by choosing Edit for an existing one).  Take a look at existing patches through the &#039;&#039;Issues with patches attached&#039;&#039; filter on the JIRA main page to get a general idea how it is done.&lt;br /&gt;
&lt;br /&gt;
With larger or sensitive patches it is a good idea to submit the patch for peer review on the [[Developer_communication_tools|mailing list]].  This way fellow developers can review the patch, uncover possible bugs, comment on undesired interactions or generally share ideas with you.&lt;br /&gt;
&lt;br /&gt;
Just subscribe to the mailing list, then write an email to the list with a link to the description of what it does in the text.&lt;br /&gt;
&lt;br /&gt;
Also, offer a description of the patch (the why and what) as a separate file and/or as a description or comment with the issue.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applying patches to your source ==&lt;br /&gt;
&lt;br /&gt;
In case you are interested, the application of other patches to your source is easy.  Assuming that you are at the directory level from where the patch references the files (usually in the folder where you see the &#039;&#039;&#039;linden&#039;&#039;&#039; folder), applying a patch can be done via:&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 -i changes.patch&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
  c:\cygwin\bin\patch -p 0 &amp;lt; changes.patch&lt;br /&gt;
&lt;br /&gt;
On your first attempts, you might also be interested in the &#039;&#039;&#039;--verbose&#039;&#039;&#039;, &#039;&#039;&#039;--backup&#039;&#039;&#039; or &#039;&#039;&#039;--dry-run&#039;&#039;&#039; (simulate patch) options.  See &#039;&#039;&#039;patch --help&#039;&#039;&#039; for details.&lt;br /&gt;
&lt;br /&gt;
 c:\cygwin\bin\patch -p 0 --verbose --backup --dry-run -i changes.patch&lt;br /&gt;
&lt;br /&gt;
Also, if a patch fails, look for files ending with &#039;&#039;&#039;.rej&#039;&#039;&#039; in the target folder.&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Help_talk:Contents&amp;diff=30996</id>
		<title>Help talk:Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Help_talk:Contents&amp;diff=30996"/>
		<updated>2007-09-09T22:22:48Z</updated>

		<summary type="html">&lt;p&gt;Mayera Nagy: Help talk:Contents moved to Help talk:Mayera nagy: Cause i don,t know what i have to do for can be talking thanks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Copy from MediaWiki ==&lt;br /&gt;
&lt;br /&gt;
Rather than just copy and paste the MediaWiki help files (in the public domain) we should also modify them to be more descriptive to users who have not used the syntax extensively. --[[User:TxMasterG Ping|TxMasterG Ping]] 15:10, 16 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Listing the Templates ==&lt;br /&gt;
&lt;br /&gt;
There are many more templates than just those noted at the bottom of the page. Should we included All(Special:Prefixindex&amp;amp;from=&amp;amp;namespace=10) of them? Should we include only those that are used? What should we do? --[[User:TxMasterG Ping|TxMasterG Ping]] 15:15, 16 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== LSL Template ==&lt;br /&gt;
&lt;br /&gt;
We really need a way to highlight LSL syntax.  Currently scripts are formatted in a small, dark hard to read format.  We need a template or format to enable coloring as in the wiki posted at http://rpgstats.com/&lt;/div&gt;</summary>
		<author><name>Mayera Nagy</name></author>
	</entry>
</feed>