<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to MergingStaticLibraries</title><link>https://sourceforge.net/p/makeitso/wiki/MergingStaticLibraries/</link><description>Recent changes to MergingStaticLibraries</description><atom:link href="https://sourceforge.net/p/makeitso/wiki/MergingStaticLibraries/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 26 Nov 2013 10:16:40 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/makeitso/wiki/MergingStaticLibraries/feed" rel="self" type="application/rss+xml"/><item><title>Discussion for MergingStaticLibraries page</title><link>https://sourceforge.net/p/makeitso/wiki/MergingStaticLibraries/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Originally posted by: &lt;a class="" href="http://code.google.com/u/113576948190133677722/" rel="nofollow"&gt;vaniyela...@gmail.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi, Im also facing problem in linking static libraries in VS2010, have gone through your solution, but didnt understand a step in that "Add a post-build step to link the libraries together. This will look something like this: lib /out:animals.lib mammals.lib dinosaurs.lib"&lt;/p&gt;
&lt;p&gt;can you please elaborate that, where that Post-build step will appear? &lt;/p&gt;
&lt;p&gt;Thanks Vani.Y &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 26 Nov 2013 10:16:40 -0000</pubDate><guid>https://sourceforge.net5f45ecf253148b40041f4c90f6f4ae46037a207c</guid></item><item><title>MergingStaticLibraries modified by Anonymous</title><link>https://sourceforge.net/p/makeitso/wiki/MergingStaticLibraries/</link><description>&lt;div class="markdown_content"&gt;&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Sometimes you want to merge a number of static libraries into one. VS2008 and VS2010 handle this differently to each other. This page describes the differences, and how to make sure that MakeItSo can generate the correct makefile in this case. &lt;/p&gt;
&lt;h3 id="examples"&gt;Examples&lt;/h3&gt;
&lt;p&gt;In the examples below we are imagining that we have two static libraries: mammals.lib and dinosaurs.lib, and that we want to combine them into one library: animals.lib. &lt;/p&gt;
&lt;h3 id="visual-studio-2008"&gt;Visual Studio 2008&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Create an animals.lib static library project &lt;/li&gt;
&lt;li&gt;Set up the project dependencies so that animals.lib depends on mammals.lib and dinosaurs.lib. &lt;/li&gt;
&lt;li&gt;In animals.lib's project linker settings, set Link Library Dependencies to true. &lt;/li&gt;
&lt;li&gt;You need to have some code in animals.lib, otherwise it won't build. If you have no code to add, you can add an empty dummy.cpp/.h class. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you build animals.lib, the resulting library will include the code from the two other libraries. &lt;/p&gt;
&lt;h3 id="visual-studio-2010"&gt;Visual Studio 2010&lt;/h3&gt;
&lt;p&gt;VS2010 has the option to Link Library Dependencies like VS2008, but it doesn't seem to work. In many cases VS2010 uses References instead of dependencies, but this doesn't work in this case. Instead you should: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create an animals.lib static library project &lt;/li&gt;
&lt;li&gt;Set up the project dependencies so that animals.lib depends on mammals.lib and dinosaurs.lib. &lt;/li&gt;
&lt;li&gt;In animals.lib's project linker settings, set Link Library Dependencies to true. &lt;/li&gt;
&lt;li&gt;Add a post-build step to link the libraries together. This will look something like this: &lt;code&gt;lib /out:animals.lib mammals.lib dinosaurs.lib&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;(You do not need any dummy code in VS2010.) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is really doing two different things: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The post-build step works in the Visual Studio build. &lt;/li&gt;
&lt;li&gt;The Link Library Dependencies does not do anything in the Visual Studio build, but it does tell MakeItSo to link the libraries together. &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 26 Nov 2013 10:16:39 -0000</pubDate><guid>https://sourceforge.net514953f7ecdd06f67303162c04dd0091fa250be8</guid></item></channel></rss>