<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code Retard &#187; C/C++</title>
	<atom:link href="http://www.coderetard.com/category/c-and-c-plus-plus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderetard.com</link>
	<description>Anything Geeky Goes!</description>
	<lastBuildDate>Fri, 20 Nov 2009 13:30:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Generate a .lib from a DLL with Visual Studio</title>
		<link>http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/</link>
		<comments>http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 15:43:00 +0000</pubDate>
		<dc:creator>adm_snackbar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[generate lib from dll]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/</guid>
		<description><![CDATA[
		
		
		
		
Oftentimes programmers have to deal with external third party DLLs that their software rely on to function. This is both smart and useful because as long as the DLL interface remains the same, externally linked DLLs can be easily swapped in and out without having to recompile and rebuild code. However, linking code in Visual [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2008/04/07/how-to-automate-builds-with-visual-studio/' rel='bookmark' title='Permanent Link: How to Automate Builds with Visual Studio'>How to Automate Builds with Visual Studio</a></li><li><a href='http://www.coderetard.com/2008/11/30/microsoft-sues-to-defend-visual-studio-users/' rel='bookmark' title='Permanent Link: Microsoft Sues to Defend Visual Studio Users'>Microsoft Sues to Defend Visual Studio Users</a></li><li><a href='http://www.coderetard.com/2008/10/08/svn-error-while-loading-shared-libraries-libcom_errso3/' rel='bookmark' title='Permanent Link: SVN Error While Loading Shared Libraries: libcom_err.so.3'>SVN Error While Loading Shared Libraries: libcom_err.so.3</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "Generate+a+.lib+from+a+DLL+with+Visual+Studio";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Oftentimes programmers have to deal with external third party DLLs that their software rely on to function. This is both smart and useful because as long as the DLL interface remains the same, externally linked DLLs can be easily swapped in and out without...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><img src="http://www.coderetard.com/wp-content/uploads/2009/01/vs_teamsystem.jpg" alt="visual studio team system" title="visual studio team system" width="500" height="375" class="size-full wp-image-3512" /></p>
<p>Oftentimes programmers have to deal with external third party DLLs that their software rely on to function. This is both smart and useful because as long as the DLL interface remains the same, externally linked DLLs can be easily swapped in and out without having to recompile and rebuild code. However, linking code in Visual Studio with an external library requires that a .lib file exist &#8211; the DLL is actually not sufficient for this task. Fortunately, there is a way to generate a .lib from a DLL with Visual Studio. Creating the .lib file is a bit like reverse engineering the DLL&#8217;s symbols.</p>
<p> <span id="more-3509"></span>
</p>
<ol>
<li>Regardless of your Visual Studio version, whether it&#8217;s for 2003, 2005, or 2008 .NET, open up the Visual Studio Tools command promopt (something like Start -&gt; Program Files -&gt; Microsoft Visual Studio -&gt; Visual Studio Tools -&gt; Visual Studio Command Prompt). </li>
<li>If you have a .def file for your DLL, you can skip this step. Otherwise if your DLL did not ship with a .def file, you have a bit of work ahead of you. You cannot generate a .lib without a .def file first, sorry. To generate a .def file from a DLL, execute the <strong>dumpbin</strong> command to extract the function names from your DLL. In our example, we will be building from sqlite3.dll.       <br /><code>dumpbin /exports C:\path\to\sqlite3.dll</code>The output appears below:<img title="vs_dumpbin" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="467" alt="vs_dumpbin" src="http://www.coderetard.com/wp-content/uploads/2009/01/vs-dumpbin.jpg" width="499" border="0" />       <br />The function names boxed in red are what you need to care about. Copy just the function name text into a new file with .def extension. Start the new file with &quot;EXPORTS” without the quotes and then have each function on its own line like this:       <br /><code>EXPORTS        <br />sqlite3_aggregate_context         <br />sqlite3_aggregate_count         <br />sqlite3_auto_extension         <br />sqlite3_bind_blob         <br />sqlite3_bind_double         <br />sqlite3_bind_int         <br />sqlite3_bind_int64         <br />...         <br /></code></li>
<li>With your new definition file in tow, in the command prompt you can execute the <strong>lib</strong> command to finally generate the .lib file:<code>lib /def:C:\path\to\sqlite3.def /out:C:\path\to\sqlite3.lib /machine:x86</code>       <br />This generates the .lib file you can use to link with in your project file. Note that the /machine argument can take any number of machine configuration so be sure to choose the correct one. To get a list of all machine types, simply type “lib” by itself. Here is the usage below for your edification:       <br /><code>usage: LIB [options] [files]
<p>options:         </p>
<p>/DEF[:filename]         <br />/EXPORT:symbol         <br />/EXTRACT:membername         <br />/INCLUDE:symbol         <br />/LIBPATH:dir         <br />/LIST[:filename]         </p>
<p>/MACHINE:{AM33|ARM|EBC|IA64|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX|         <br />SH3|SH3DSP|SH4|SH5|THUMB|X86}         <br />/NAME:filename         <br />/NODEFAULTLIB[:library]         <br />/NOLOGO         <br />/OUT:filename         <br />/REMOVE:membername         <br />/SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|         <br />EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|         <br />WINDOWSCE}[,#[.##]]         <br />/VERBOSE</code> </li>
</ol>
<p>And if you came looking for sqlite3.lib we just saved you a lot of time.</p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="Generate a .lib from a DLL with Visual Studio" url="http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio%20-%20http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio&amp;bodytext=%0D%0AOftentimes%20programmers%20have%20to%20deal%20with%20external%20third%20party%20DLLs%20that%20their%20software%20rely%20on%20to%20function.%20This%20is%20both%20smart%20and%20useful%20because%20as%20long%20as%20the%20DLL%20interface%20remains%20the%20same%2C%20externally%20linked%20DLLs%20can%20be%20easily%20swapped%20in%20and%20out" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio&amp;notes=%0D%0AOftentimes%20programmers%20have%20to%20deal%20with%20external%20third%20party%20DLLs%20that%20their%20software%20rely%20on%20to%20function.%20This%20is%20both%20smart%20and%20useful%20because%20as%20long%20as%20the%20DLL%20interface%20remains%20the%20same%2C%20externally%20linked%20DLLs%20can%20be%20easily%20swapped%20in%20and%20out" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;submitHeadline=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio&amp;submitSummary=%0D%0AOftentimes%20programmers%20have%20to%20deal%20with%20external%20third%20party%20DLLs%20that%20their%20software%20rely%20on%20to%20function.%20This%20is%20both%20smart%20and%20useful%20because%20as%20long%20as%20the%20DLL%20interface%20remains%20the%20same%2C%20externally%20linked%20DLLs%20can%20be%20easily%20swapped%20in%20and%20out&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;h=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;t=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2009%2F01%2F21%2Fgenerate-a-lib-from-a-dll-with-visual-studio%2F&amp;title=Generate%20a%20.lib%20from%20a%20DLL%20with%20Visual%20Studio&amp;annotation=%0D%0AOftentimes%20programmers%20have%20to%20deal%20with%20external%20third%20party%20DLLs%20that%20their%20software%20rely%20on%20to%20function.%20This%20is%20both%20smart%20and%20useful%20because%20as%20long%20as%20the%20DLL%20interface%20remains%20the%20same%2C%20externally%20linked%20DLLs%20can%20be%20easily%20swapped%20in%20and%20out" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2008/04/07/how-to-automate-builds-with-visual-studio/' rel='bookmark' title='Permanent Link: How to Automate Builds with Visual Studio'>How to Automate Builds with Visual Studio</a></li><li><a href='http://www.coderetard.com/2008/11/30/microsoft-sues-to-defend-visual-studio-users/' rel='bookmark' title='Permanent Link: Microsoft Sues to Defend Visual Studio Users'>Microsoft Sues to Defend Visual Studio Users</a></li><li><a href='http://www.coderetard.com/2008/10/08/svn-error-while-loading-shared-libraries-libcom_errso3/' rel='bookmark' title='Permanent Link: SVN Error While Loading Shared Libraries: libcom_err.so.3'>SVN Error While Loading Shared Libraries: libcom_err.so.3</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQLite with C++ Example: A Compact Serverless Database Alternative</title>
		<link>http://www.coderetard.com/2008/12/09/sqlite-with-c-example-a-compact-serverless-database-alternative/</link>
		<comments>http://www.coderetard.com/2008/12/09/sqlite-with-c-example-a-compact-serverless-database-alternative/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 05:26:17 +0000</pubDate>
		<dc:creator>adm_snackbar</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[serverless database alternative]]></category>
		<category><![CDATA[sqlite c++ example]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2008/12/09/2996/</guid>
		<description><![CDATA[
		
		
		
		
Have you got an application you’re working on that requires the power to store and query data of a SQL database but don’t need the hassle of setting up a client and server solution? Today, let us introduce you to SQLite which was made just for you. Besides being complete free, it’s a small and [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2008/05/05/how-to-automate-your-mysql-database-backups/' rel='bookmark' title='Permanent Link: How to Automate your MySQL database backups'>How to Automate your MySQL database backups</a></li><li><a href='http://www.coderetard.com/2008/03/26/ms-sql-server-error-4064-cannot-connect-to-local-server/' rel='bookmark' title='Permanent Link: MS SQL Server Error: 4064.  Cannot connect to local Server'>MS SQL Server Error: 4064.  Cannot connect to local Server</a></li><li><a href='http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/' rel='bookmark' title='Permanent Link: Generate a .lib from a DLL with Visual Studio'>Generate a .lib from a DLL with Visual Studio</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2008/12/09/sqlite-with-c-example-a-compact-serverless-database-alternative/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "SQLite+with+C%2B%2B+Example%3A+A+Compact+Serverless+Database+Alternative";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Have you got an application you’re working on that requires the power to store and query data of a SQL database but don’t need the hassle of setting up a client and server solution? Today, let us introduce you to SQLite which was made just for you....";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><img src="http://www.coderetard.com/wp-content/uploads/2008/12/sqlite1.gif" alt="sqlite1 SQLite with C++ Example: A Compact Serverless Database Alternative" title="sqlite" width="327" height="97" class="alignnone size-full wp-image-3016" />
<p>Have you got an application you’re working on that requires the power to store and query data of a SQL database but don’t need the hassle of setting up a client and server solution? Today, let us introduce you to <a href="http://www.sqlite.org/">SQLite</a> which was made just for you. Besides being complete free, it’s a small and fast library that acts as a SQL database wrapper to a plain text file that sits locally in your application. What this means is you can create and enforce all the great structured tables in your database design as well as construct intricate data queries just like you do with any server-backed SQL database, except your database is just a local file – no server or client architecture needed. From the SQLite website:</p>
<blockquote><p>SQLite is a in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is currently found in more applications than we can count, including several high-profile projects</p>
</blockquote>
<p><span id="more-2996"></span></p>
<p>SQLite is easy to set up with <a href="http://www.sqlite.org/tclsqlite.html">Tcl</a> and <a href="http://www.sqlite.org/c3ref/intro.html">C/C++</a> interfaces and boasts a powerhouse of a user base including Adobe, Firefox, Microsoft, Apple, Google, and McAfee, just to name a <a href="http://www.sqlite.org/famous.html">few</a>.</p>
<p>Just to show how easy SQLite is to use in a C++ program, here are a few lines of code that will help you understand how easy SQLite is to use and how it might be a good fit for your needs:</p>
<p><code>&#35;include &lt;sqlite3.h&gt;<br />
sqlite3* db;<br />
char* db_err;<br />
int main() { <br />
&#160; sqlite3_open(“my_db.sql3”, &amp;db);<br />
&#160; sqlite3_exec&#40;db, "create table 'helloworld' &#40;id integer&#41;;", NULL, 0, &#38;db_err&#41;<br />
&#160; sqlite3_close(db);<br />
}<br />
</code> </p>
<p>And that’s a wrap. You pass any valid SQL query to the sqlite3_exec() function to do all your database manipulation. Data retrieval is passed via the parameters in a user-specified a callback function (in this example it was not used and was thus NULL). At any rate this simple example should be enough to help you get started with SQLite for your new project.</p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="SQLite with C++ Example: A Compact Serverless Database Alternative" url="http://www.coderetard.com/2008/12/09/sqlite-with-c-example-a-compact-serverless-database-alternative/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative%20-%20http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative&amp;bodytext=%20%20Have%20you%20got%20an%20application%20you%E2%80%99re%20working%20on%20that%20requires%20the%20power%20to%20store%20and%20query%20data%20of%20a%20SQL%20database%20but%20don%E2%80%99t%20need%20the%20hassle%20of%20setting%20up%20a%20client%20and%20server%20solution%3F%20Today%2C%20let%20us%20introduce%20you%20to%20SQLite%20which%20was%20made%20just%20for%20" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative&amp;notes=%20%20Have%20you%20got%20an%20application%20you%E2%80%99re%20working%20on%20that%20requires%20the%20power%20to%20store%20and%20query%20data%20of%20a%20SQL%20database%20but%20don%E2%80%99t%20need%20the%20hassle%20of%20setting%20up%20a%20client%20and%20server%20solution%3F%20Today%2C%20let%20us%20introduce%20you%20to%20SQLite%20which%20was%20made%20just%20for%20" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;submitHeadline=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative&amp;submitSummary=%20%20Have%20you%20got%20an%20application%20you%E2%80%99re%20working%20on%20that%20requires%20the%20power%20to%20store%20and%20query%20data%20of%20a%20SQL%20database%20but%20don%E2%80%99t%20need%20the%20hassle%20of%20setting%20up%20a%20client%20and%20server%20solution%3F%20Today%2C%20let%20us%20introduce%20you%20to%20SQLite%20which%20was%20made%20just%20for%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;h=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;t=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2008%2F12%2F09%2Fsqlite-with-c-example-a-compact-serverless-database-alternative%2F&amp;title=SQLite%20with%20C%2B%2B%20Example%3A%20A%20Compact%20Serverless%20Database%20Alternative&amp;annotation=%20%20Have%20you%20got%20an%20application%20you%E2%80%99re%20working%20on%20that%20requires%20the%20power%20to%20store%20and%20query%20data%20of%20a%20SQL%20database%20but%20don%E2%80%99t%20need%20the%20hassle%20of%20setting%20up%20a%20client%20and%20server%20solution%3F%20Today%2C%20let%20us%20introduce%20you%20to%20SQLite%20which%20was%20made%20just%20for%20" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2008/05/05/how-to-automate-your-mysql-database-backups/' rel='bookmark' title='Permanent Link: How to Automate your MySQL database backups'>How to Automate your MySQL database backups</a></li><li><a href='http://www.coderetard.com/2008/03/26/ms-sql-server-error-4064-cannot-connect-to-local-server/' rel='bookmark' title='Permanent Link: MS SQL Server Error: 4064.  Cannot connect to local Server'>MS SQL Server Error: 4064.  Cannot connect to local Server</a></li><li><a href='http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/' rel='bookmark' title='Permanent Link: Generate a .lib from a DLL with Visual Studio'>Generate a .lib from a DLL with Visual Studio</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2008/12/09/sqlite-with-c-example-a-compact-serverless-database-alternative/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Switching from Static to Dynamic Linking</title>
		<link>http://www.coderetard.com/2008/03/21/switching-from-static-to-dynamic-linking/</link>
		<comments>http://www.coderetard.com/2008/03/21/switching-from-static-to-dynamic-linking/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 15:59:43 +0000</pubDate>
		<dc:creator>adm_snackbar</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[dynamic linking]]></category>
		<category><![CDATA[g++]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[linking]]></category>
		<category><![CDATA[Makefile]]></category>
		<category><![CDATA[static linking]]></category>
		<category><![CDATA[sunos]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2008/03/21/switching-from-static-to-dynamic-linking/</guid>
		<description><![CDATA[
		
		
		
		Recently I had to modify a library to use dynamic linking in order to cut down on its size. Originally a 8MB file, I was looking at reducing the size to 1.3MB. Pretty great right? So why not dynamically link every time? Well, there are certain times when static linking, though it increases the size [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2008/04/28/emacs-keyword-syntax-highlighting-for-verilog-specman-elite/' rel='bookmark' title='Permanent Link: Emacs Keyword Syntax Highlighting for Verilog, Specman Elite'>Emacs Keyword Syntax Highlighting for Verilog, Specman Elite</a></li><li><a href='http://www.coderetard.com/2008/04/07/how-to-automate-builds-with-visual-studio/' rel='bookmark' title='Permanent Link: How to Automate Builds with Visual Studio'>How to Automate Builds with Visual Studio</a></li><li><a href='http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/' rel='bookmark' title='Permanent Link: Generate a .lib from a DLL with Visual Studio'>Generate a .lib from a DLL with Visual Studio</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2008/03/21/switching-from-static-to-dynamic-linking/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "Switching+from+Static+to+Dynamic+Linking";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Recently I had to modify a library to use dynamic linking in order to cut down on its size. Originally a 8MB file, I was looking at reducing the size to 1.3MB. Pretty great right? So why not dynamically link every time? Well, there are certain times when...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Recently I had to modify a library to use dynamic linking in order to cut down on its size. Originally a 8MB file, I was looking at reducing the size to 1.3MB. Pretty great right? So why not dynamically link every time? Well, there are certain times when static linking, though it increases the size of your library, might be preferable.<span id="more-217"></span> For example, your library may be using some obscure third-party library that your customer does not have. If you dynamically linked this, you&#8217;d either require the customer to also have this library on his host, or else ship the third-party library with your own. Perhaps due to licensing reasons, incompatible versions or unavailability, this may not always be possible or even ideal. In my case, the third-party library was 10MB. Shipping it with my 1.3MB library would actually have a net <em>increase</em> in total package size. But since I was actually shipping several of my own smaller libraries which all used to statically link the third-party library, eventually the savings overcame the gain.</p>
<p>To do this is a matter of modifying your Makefile, there is no code change necessary unless you plan to call some functions in the third-party library, in which case you&#8217;ll need to use dlopen(). For me there was nothing this complicated, I just needed my third-party header files to be defined&#8230; no function calls needed. The original Makefile was doing something like this:</p>
<p><code>g++ -c -o main.o main.cpp</code><br />
<code>g++ -L/home/user/tool/static-libs -lstatic_third_party_lib -o main main.o</code></p>
<p>To make it dynamically link, you first need to find the dynamic version of the third party library. Usually static libraries have a *.a extension. Dynamic libraries have a *.so extension. Once I found the path to the dynamic library, I simply modified my Makefile like so:</p>
<p><code>g++ -c -o main.o main.cpp</code><br />
<code>g++ -L/home/user/tool/dynamic-libs -ldyn_third_party_lib -o main main.o</code></p>
<p>In this way, your own library will be smaller but you have now imposed a requirement on your user. Regardless of how you get your customer the third party lib, he will have to modify his LD_LIBRARY_PATH to include a path to it. But this was not good enough for me, my requirement was to rid the library of that dependency. So what do to? There&#8217;s another option that is generally considered good programming convention that you should always use with the -L option, and that is &#8211;rpath. This option specifies the run-time path that your library will look for the third-party library, avoiding the need for the customer to set LD_LIBRARY_PATH. The Makefile would be extended like so:</p>
<p><code>g++ -c -o main.o main.cpp</code><br />
<code>g++ -L/home/user/tool/dynamic-libs -Wl,--rpath=/home/user/tool/dynamic-libs -ldyn_third_party_lib -o main main.o</code></p>
<p>Basically, any time you use -L, use -Wl,&#8211;rpath with the same path. This is great if you know the absolute path where it will be installed on your customer&#8217;s machine, but this may not always be true. For our software, the user is free to install it anywhere, and thus this option would not be useful. There is one more trick you can play to get this to work, and that is to use a relative path using the $ORIGIN variable. This is self-defined to be the path in which your library resides, you do not have to define it in your Makefile. Use it like so:</p>
<p><code>g++ -c -o main.o main.cpp</code><br />
<code>g++ -L/home/user/tool/dynamic-libs -Wl,--rpath=\$$ORIGIN/../../my/own/path/dynamic-libs -z origin -ldyn_third_party_lib -o main main.o</code></p>
<p>For you guys developing on SunOS, replace the -Wl,&#8211;rpath= option with -R, like this:</p>
<p><code>CC -c -o main.o main.cpp</code><br />
<code>CC -L/home/user/tool/dynamic-libs -R\$$ORIGIN/../../my/own/path/dynamic-libs -z origin -ldyn_third_party_lib -o main main.o</code></p>
<p>For you Windows guys, how did I manage to hold your attention until here?</p>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="Switching from Static to Dynamic Linking" url="http://www.coderetard.com/2008/03/21/switching-from-static-to-dynamic-linking/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Switching%20from%20Static%20to%20Dynamic%20Linking%20-%20http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;title=Switching%20from%20Static%20to%20Dynamic%20Linking&amp;bodytext=Recently%20I%20had%20to%20modify%20a%20library%20to%20use%20dynamic%20linking%20in%20order%20to%20cut%20down%20on%20its%20size.%20Originally%20a%208MB%20file%2C%20I%20was%20looking%20at%20reducing%20the%20size%20to%201.3MB.%20Pretty%20great%20right%3F%20So%20why%20not%20dynamically%20link%20every%20time%3F%20Well%2C%20there%20are%20certain%20times%20" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;title=Switching%20from%20Static%20to%20Dynamic%20Linking&amp;notes=Recently%20I%20had%20to%20modify%20a%20library%20to%20use%20dynamic%20linking%20in%20order%20to%20cut%20down%20on%20its%20size.%20Originally%20a%208MB%20file%2C%20I%20was%20looking%20at%20reducing%20the%20size%20to%201.3MB.%20Pretty%20great%20right%3F%20So%20why%20not%20dynamically%20link%20every%20time%3F%20Well%2C%20there%20are%20certain%20times%20" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;title=Switching%20from%20Static%20to%20Dynamic%20Linking" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Switching%20from%20Static%20to%20Dynamic%20Linking&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;title=Switching%20from%20Static%20to%20Dynamic%20Linking" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;title=Switching%20from%20Static%20to%20Dynamic%20Linking" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;submitHeadline=Switching%20from%20Static%20to%20Dynamic%20Linking&amp;submitSummary=Recently%20I%20had%20to%20modify%20a%20library%20to%20use%20dynamic%20linking%20in%20order%20to%20cut%20down%20on%20its%20size.%20Originally%20a%208MB%20file%2C%20I%20was%20looking%20at%20reducing%20the%20size%20to%201.3MB.%20Pretty%20great%20right%3F%20So%20why%20not%20dynamically%20link%20every%20time%3F%20Well%2C%20there%20are%20certain%20times%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;h=Switching%20from%20Static%20to%20Dynamic%20Linking" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;t=Switching%20from%20Static%20to%20Dynamic%20Linking" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F21%2Fswitching-from-static-to-dynamic-linking%2F&amp;title=Switching%20from%20Static%20to%20Dynamic%20Linking&amp;annotation=Recently%20I%20had%20to%20modify%20a%20library%20to%20use%20dynamic%20linking%20in%20order%20to%20cut%20down%20on%20its%20size.%20Originally%20a%208MB%20file%2C%20I%20was%20looking%20at%20reducing%20the%20size%20to%201.3MB.%20Pretty%20great%20right%3F%20So%20why%20not%20dynamically%20link%20every%20time%3F%20Well%2C%20there%20are%20certain%20times%20" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2008/04/28/emacs-keyword-syntax-highlighting-for-verilog-specman-elite/' rel='bookmark' title='Permanent Link: Emacs Keyword Syntax Highlighting for Verilog, Specman Elite'>Emacs Keyword Syntax Highlighting for Verilog, Specman Elite</a></li><li><a href='http://www.coderetard.com/2008/04/07/how-to-automate-builds-with-visual-studio/' rel='bookmark' title='Permanent Link: How to Automate Builds with Visual Studio'>How to Automate Builds with Visual Studio</a></li><li><a href='http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/' rel='bookmark' title='Permanent Link: Generate a .lib from a DLL with Visual Studio'>Generate a .lib from a DLL with Visual Studio</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2008/03/21/switching-from-static-to-dynamic-linking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful Quick References</title>
		<link>http://www.coderetard.com/2008/03/17/useful-quick-references/</link>
		<comments>http://www.coderetard.com/2008/03/17/useful-quick-references/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 05:12:39 +0000</pubDate>
		<dc:creator>adm_snackbar</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[quick references]]></category>
		<category><![CDATA[quickref]]></category>
		<category><![CDATA[quickrefs]]></category>
		<category><![CDATA[stl]]></category>
		<category><![CDATA[verilog]]></category>

		<guid isPermaLink="false">http://www.coderetard.com/2008/03/17/useful-quick-references/</guid>
		<description><![CDATA[
		
		
		
		Whether you program in C++ or code in HTML, you&#8217;ve probably encountered a quick reference (&#8221;quickref&#8221; for short) at some point in your career. These handy guides aren&#8217;t meant to teach newbies how to use the language, but are more like the index at the back of your textbook except condensed and consolidated in a [...]


Related Posts:<ol><li><a href='http://www.coderetard.com/2009/02/17/mindys-daily-links-21709/' rel='bookmark' title='Permanent Link: Mindy&#8217;s Daily Links &#8211; 2/17/09'>Mindy&#8217;s Daily Links &#8211; 2/17/09</a></li><li><a href='http://www.coderetard.com/2009/03/02/mindys-daily-links-3209/' rel='bookmark' title='Permanent Link: Mindy&#8217;s Daily Links &#8211; 3/2/09'>Mindy&#8217;s Daily Links &#8211; 3/2/09</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.coderetard.com/2008/03/17/useful-quick-references/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "";
		digg_title = "Useful+Quick+References";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Whether you program in C++ or code in HTML, you&#8217;ve probably encountered a quick reference (&#8221;quickref&#8221; for short) at some point in your career. These handy guides aren&#8217;t meant to teach newbies how to use the language, but are more...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Whether you program in C++ or code in HTML, you&#8217;ve probably encountered a quick reference (&#8221;quickref&#8221; for short) at some point in your career. These handy guides aren&#8217;t meant to teach newbies how to use the language, but are more like the index at the back of your textbook except condensed and consolidated in a few pages. Today&#8217;s post lists a few useful quickrefs that I&#8217;ve accumulated over the years.<span id="more-111"></span> Here they are sorted by category:</p>
<p>For the web:</p>
<ul>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/visibone_web_designers_html_card.pdf' title='Web Designer's HTML Card'>Web Designer&#8217;s HTML Card</a> (credit: VisiBone)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/jsquick.pdf' title='Javascript Quickref v1.03'>Javascript Quickref v1.03</a> (credit: explain.th.at)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/cascading-style-sheets-10.pdf' title='CSS Quickref'>CSS Quickref</a> (credit: deepx)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/php-cheat-sheet.pdf' title='PHP Quickref'>PHP Quickref</a> (credit: ilovejackdaniels.com)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/mysql-402a.pdf' title='MySQL Quickref v4.0.2a'>MySQL Quickref v4.0.2a</a> (credit: deepx)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/jsp-quick-reference-card.pdf' title='JSP Quickref'>JSP Quickref</a> (credit: Allaire)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/ruby-language-quickref.pdf' title='Ruby Language Quickref'>Ruby Language Quickref</a></li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/ruby-library-quickref.pdf' title='Ruby Library Quickref'>Ruby Library Quickref</a></li>
</ul>
<p><br/></p>
<p>For Microsoft:</p>
<ul>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/core-csharp-and-net-quick-reference.pdf' title='C# Quickref'>C# Quickref</a></li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/microsoft-foundation-classes-mfc-quick-reference.pdf' title='MFC Quickref'>MFC Quickref</a> (credit: He)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/vbnet-quick-reference.pdf' title='VB.NET Quickref'>VB.NET Quickref</a> (credit: Kellerman)</li>
</ul>
<p><br/></p>
<p>For C/C++:</p>
<ul>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/c-reference-card-ansi.pdf' title='ANSI C Quickref v1.3'>ANSI C Quickref v1.3</a> (credit: Silverman)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/stl-quick-reference-126.pdf' title='STL Quickref v1.26'>STL Quickref v1.26</a> (credit: Medini)</li>
</ul>
<p><br/></p>
<p>For Configuration Management:</p>
<ul>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/cvs-quick-reference-card.pdf' title='CVS Quickref v0.1'>CVS Quickref v0.1</a> (credit: Ford)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/subversion-quick-reference-card.pdf' title='SVN Quickref v28'>SVN Quickref v28</a> (credit: Sobaniec)</li>
</ul>
<p><br/></p>
<p>For Hardware:</p>
<ul>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/verilog_quickref_card1.pdf' title='Verilog Quickref'>Verilog Quickref</a> (credit: Qualis)</li>
<li><a href='http://www.coderetard.com/wp-content/uploads/2008/03/systemc_quickreference.pdf' title='SystemC Quickref'>SystemC Quickref</a> (credit: Transfer)</li>
</ul>
<script type="text/javascript" class="owbutton" src="http://www.onlywire.com/btn/button_2" title="Useful Quick References" url="http://www.coderetard.com/2008/03/17/useful-quick-references/"></script>
<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow" id="twitter"  target="_blank" href="http://twitter.com/home?status=Useful%20Quick%20References%20-%20http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F" title="Twitter"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;title=Useful%20Quick%20References&amp;bodytext=Whether%20you%20program%20in%20C%2B%2B%20or%20code%20in%20HTML%2C%20you%27ve%20probably%20encountered%20a%20quick%20reference%20%28%22quickref%22%20for%20short%29%20at%20some%20point%20in%20your%20career.%20These%20handy%20guides%20aren%27t%20meant%20to%20teach%20newbies%20how%20to%20use%20the%20language%2C%20but%20are%20more%20like%20the%20index%20at%20th" title="Digg"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;title=Useful%20Quick%20References&amp;notes=Whether%20you%20program%20in%20C%2B%2B%20or%20code%20in%20HTML%2C%20you%27ve%20probably%20encountered%20a%20quick%20reference%20%28%22quickref%22%20for%20short%29%20at%20some%20point%20in%20your%20career.%20These%20handy%20guides%20aren%27t%20meant%20to%20teach%20newbies%20how%20to%20use%20the%20language%2C%20but%20are%20more%20like%20the%20index%20at%20th" title="del.icio.us"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="propeller"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F" title="Propeller"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;title=Useful%20Quick%20References" title="Reddit"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="slashdot"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Useful%20Quick%20References&amp;url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F" title="Slashdot"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;title=Useful%20Quick%20References" title="StumbleUpon"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F" title="Technorati"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;title=Useful%20Quick%20References" title="Mixx"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="yahoobuzz"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;submitHeadline=Useful%20Quick%20References&amp;submitSummary=Whether%20you%20program%20in%20C%2B%2B%20or%20code%20in%20HTML%2C%20you%27ve%20probably%20encountered%20a%20quick%20reference%20%28%22quickref%22%20for%20short%29%20at%20some%20point%20in%20your%20career.%20These%20handy%20guides%20aren%27t%20meant%20to%20teach%20newbies%20how%20to%20use%20the%20language%2C%20but%20are%20more%20like%20the%20index%20at%20th&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="newsvine"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;h=Useful%20Quick%20References" title="NewsVine"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;t=Useful%20Quick%20References" title="Facebook"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="google"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.coderetard.com%2F2008%2F03%2F17%2Fuseful-quick-references%2F&amp;title=Useful%20Quick%20References&amp;annotation=Whether%20you%20program%20in%20C%2B%2B%20or%20code%20in%20HTML%2C%20you%27ve%20probably%20encountered%20a%20quick%20reference%20%28%22quickref%22%20for%20short%29%20at%20some%20point%20in%20your%20career.%20These%20handy%20guides%20aren%27t%20meant%20to%20teach%20newbies%20how%20to%20use%20the%20language%2C%20but%20are%20more%20like%20the%20index%20at%20th" title="Google Bookmarks"><img src="http://www.coderetard.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related Posts:<ol><li><a href='http://www.coderetard.com/2009/02/17/mindys-daily-links-21709/' rel='bookmark' title='Permanent Link: Mindy&#8217;s Daily Links &#8211; 2/17/09'>Mindy&#8217;s Daily Links &#8211; 2/17/09</a></li><li><a href='http://www.coderetard.com/2009/03/02/mindys-daily-links-3209/' rel='bookmark' title='Permanent Link: Mindy&#8217;s Daily Links &#8211; 3/2/09'>Mindy&#8217;s Daily Links &#8211; 3/2/09</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.coderetard.com/2008/03/17/useful-quick-references/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
