premiere-libtorrent/docs/vs2005_build_notes.html

118 lines
5.4 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
<title>libtorrent setup for VS.NET 2005 Development</title>
<meta name="author" content="THOMAS GODDARD" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="document" id="libtorrent-setup-for-vs-net-2005-development">
<h1 class="title">libtorrent setup for VS.NET 2005 Development</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>THOMAS GODDARD</td></tr>
<tr><th class="docinfo-name">Contact:</th>
<td>www.thomasgoddard.com</td></tr>
</tbody>
</table>
<div class="section" id="prerequisites">
<h1><a name="prerequisites">Prerequisites</a></h1>
<ol class="arabic simple">
<li>Download boost from boost.org</li>
<li>Download libtorrent</li>
<li>Extract both to a folder called libtorrent</li>
</ol>
</div>
<div class="section" id="compiling-boost-for-vs-net-2005">
<h1><a name="compiling-boost-for-vs-net-2005">Compiling boost for VS.NET 2005</a></h1>
<ol class="arabic simple">
<li>Copy bjam.exe to libtorrent\boost_[version]\tools\build</li>
<li>Add the path &quot;libtorrent\boost_[version]\tools\build&quot; to the windows path environment variable</li>
<li>Log off / log back on</li>
<li>Open the file &quot;libtorrent\boost_[version]\tools\build\user-config.jam&quot; in notepad</li>
<li>Uncomment the <tt class="docutils literal"><span class="pre">#</span> <span class="pre">using</span> <span class="pre">msvc;</span></tt> line by removing the #</li>
<li>Replace the line with: <tt class="docutils literal"><span class="pre">using</span> <span class="pre">vc-8_0</span> <span class="pre">;</span></tt></li>
<li>Save the file and close it</li>
<li>Open the visual studio .net command line in the VS.net 2005 folder in your start menu</li>
<li>CD to the &quot;libtorrent\boost_[version]&quot; folder</li>
<li>Type: <tt class="docutils literal"><span class="pre">bjam</span> <span class="pre">&quot;-sTOOLS=vc-8_0&quot;</span> <span class="pre">install</span></tt> and hit enter</li>
<li>Be patient and wait for it to finish</li>
</ol>
<div class="section" id="troubleshooting">
<h2><a name="troubleshooting">Troubleshooting</a></h2>
<ul class="simple">
<li>Make sure to CD to the root of the boost directory before running the install.</li>
<li>For additional details and information on using Visual Studio 2005 Express addition, see the Boost Getting Started Guide.</li>
</ul>
</div>
</div>
<div class="section" id="setting-up-and-compiling-libtorrent-with-vs-net-2005">
<h1><a name="setting-up-and-compiling-libtorrent-with-vs-net-2005">Setting up and compiling libtorrent with VS.NET 2005</a></h1>
<ol class="arabic">
<li><p class="first">Create a new vs.net 2005 MFC project and solution file in the root of the libtorrent folder where you extracted all of the libtorrent files.</p>
</li>
<li><p class="first">Include the files contained in the src folder, excluding the makefiles.
<strong>NOTE:</strong>
Only include either file.cpp or file_win.cpp. Read here to determine which file to include:
<a class="reference" href="http://www.rasterbar.com/products/libtorrent/docs.html#building-with-other-build-systems">http://www.rasterbar.com/products/libtorrent/docs.html#building-with-other-build-systems</a></p>
</li>
<li><p class="first">Include all .c files in the zlib folder.</p>
</li>
<li><p class="first">Add the following Additional Include Header Files:</p>
<pre class="literal-block">
&quot;libtorrent\include&quot;
&quot;C:\Boost\include\boost-1_33_1&quot;
&quot;libtorrent\zlib&quot;
&quot;libtorrent\include\libtorrent&quot;
</pre>
</li>
<li><p class="first">Add the following Preprocessor Definitions:</p>
<pre class="literal-block">
WIN32
WIN32_LEAN_AND_MEAN
_WIN32_WINNT=0x0500
BOOST_ALL_NO_LIB
_FILE_OFFSET_BITS=64
BOOST_THREAD_USE_LIB
TORRENT_BUILDING_SHARED
TORRENT_LINKING_SHARED
UNICODE
</pre>
</li>
<li><p class="first">Add <tt class="docutils literal"><span class="pre">C:\Boost\lib</span></tt> to Additional Library Directories</p>
</li>
<li><p class="first">Add the following Additional Dependencies:</p>
<pre class="literal-block">
wsock32.lib
libboost_thread-vc80-mt.lib
libboost_filesystem-vc80-mt.lib
libboost_date_time-vc80-mt.lib
</pre>
</li>
<li><p class="first">Set the Runtime Library to Multi-threaded Debug DLL (/MDd) under the code generation section.</p>
</li>
</ol>
<div class="section" id="id1">
<h2><a name="id1">Troubleshooting</a></h2>
<dl class="docutils">
<dt>Error: error LNK2005:already defined etc...</dt>
<dd>Make sure you use the Multi-threaded Debug DLL (/MDd)</dd>
<dt>Error: error linking zlib related files...</dt>
<dd>Make sure to include all .c files in the zlib folder.</dd>
<dt>Runtime error in client_test.exe</dt>
<dd>If you're using boost-1.33.1, there is a bug in the program options
library which will make VS.NET 2005 assert. For a patch, see:
<a class="reference" href="http://thread.gmane.org/gmane.comp.lib.boost.devel/140932/focus=140932">http://thread.gmane.org/gmane.comp.lib.boost.devel/140932/focus=140932</a></dd>
</dl>
</div>
</div>
</div>
</body>
</html>