<?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>The Blog of Mark (SoftCoder) and Vickie Vejvoda &#187; Technology</title>
	<atom:link href="http://soft-haus.com/blog/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://soft-haus.com/blog</link>
	<description>Its all about Jesus.</description>
	<lastBuildDate>Thu, 08 Dec 2011 23:42:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Freedom at last, Linux + MingW cross compiler&#8217;s endless possibilies</title>
		<link>http://soft-haus.com/blog/2010/12/06/freedom-at-last-linux-mingw-cross-compilers-endless-possibilies/</link>
		<comments>http://soft-haus.com/blog/2010/12/06/freedom-at-last-linux-mingw-cross-compilers-endless-possibilies/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 18:56:17 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=466</guid>
		<description><![CDATA[Having worked on an RTS (real time strategy) open source game at sourceforge.net, I came across many challenges but also learned many things related to the world of open source. This article will attempt to discuss some of those things in the hope that the information helps other developers in the open source realm. I [...]]]></description>
			<content:encoded><![CDATA[<p>Having worked on an RTS (real time strategy) open source game at sourceforge.net, I came across many challenges but also learned many things related to the world of open source. This article will attempt to discuss some of those things in the hope that the information helps other developers in the open source realm. I will attempt to share this in 2 parts, part 1 will be the ultimate way to freedom, while part 2 will discuss things encountered along the way and will act almost as a kind of story.</p>
<p><strong>Part 1: Cross compiling your C/C++ open source project in Linux, for Linux and Windows.</strong></p>
<p>The basic recipe that I used to accomplish this involves the following:</p>
<p>- CodeBlocks IDE (you could likely use eclipse too)<br />
- MingW cross compiler<br />
- All the source code for your project (and its dependencies)<br />
- time (the precious commodity that everyone wants from you)</p>
<p>For the first 2 items (CodeBlocks and MingW) got the following links:</p>
<p><a href="http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks">CodeBlocks</a><br />
<a href="http://forums.codeblocks.org/index.php?topic=3343.0">MingW</a></p>
<p>Now, a few things to keep in mind as you travel through the compilation process:</p>
<p>- you MUST recompile all dll&#8217;s and libs within MingW (VC++ and other compilers are NOT compatible with MingW)</p>
<p>Take for example compiling OpenAL (Open Audio Library) from Creative that many open source projects use. Compiling this library includes a few challenges, including the need to fix dsound.h from the DirectX SDK to compile with MingW.</p>
<p>edit dsound.h and comment out line 1899:</p>
<p><code>//typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;</code></p>
<p>next edit the file included in the OpenAL SDK named XCompile.txt so its looks something like the following:</p>
<p><pre><code># Cross-compiling requires CMake 2.6 or newer. To cross-compile, first modify
# this file to set the proper settings and paths. Then use it from build/ like:
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt \
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-DCMAKE_INSTALL_PREFIX=/usr/mingw32/mingw
# If you already have a toolchain file setup, you may use that instead of this
# file.</code></pre></p>
<p># the name of the target operating system<br />
SET(CMAKE_SYSTEM_NAME Windows)</p>
<p># which compilers to use for C and C++<br />
SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)<br />
SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)</p>
<p># here is the target environment located<br />
SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)</p>
<p># adjust the default behaviour of the FIND_XXX() commands:<br />
# search headers and libraries in the target environment, search<br />
# programs in the host environment<br />
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)</p>
<p>Next edit CMakeLists.txt to tell it where to find your DirectX SDK files adding something like the following BEFORE the section:</p>
<p><pre><code># Check DSound/MMSystem backend
IF(DSOUND)</code></pre></p>
<p>Add the following:</p>
<p><pre><code>SET (DXSDK_DIR &quot;/home/softcoder/Code/megaglest/trunk/source/win32_deps/Microsoft DirectX SDK (November 2007)&quot;)
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} &quot;${DXSDK_DIR}/Include&quot;)
INCLUDE_DIRECTORIES(&quot;${DXSDK_DIR}/Include&quot;)
LINK_DIRECTORIES(&quot;${DXSDK_DIR}/Lib&quot;)</code></pre></p>
<p>Next run cmake to produce the makefiles for OpenAL which should now properly find direct sound from DirectX:</p>
<p><code>cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt -DCMAKE_INSTALL_PREFIX=/usr/i586-mingw32msvc</code></p>
<p>make</p>
<p>after running this you should get OpenAL lib&#8217;s / DLL&#8217;s produced for MingW.</p>
<p>As a general rule you simply need to point the compiler etc.. the MingW&#8217;s and any dependencies need to find your MingW compiled libs.</p>
<p>For example Compiling lobogg and libvorbis:</p>
<p><code>./configure --host=i586-mingw32msvc --build=i686-pc-linux-gnu --enable-shared --disable-static --libdir=./lib</code></p>
<p>make</p>
<p><code>LDFLAGS=&quot;-L/home/softcoder/Code/megaglest/trunk/source/win32_deps/lib&quot; ./configure --host=i586-mingw32msvc --enable-shared --disable-static --with-ogg-libraries=../lib --with-ogg-includes=../libogg-1.2.1/include</code></p>
<p>make</p>
<p><strong>What should you do if you get lots of:</strong></p>
<p><code>undefined reference to x</code></p>
<p>linker errors? This typically means you need to order the libs in your project in proper order! Here&#8217;s an example from my codeblocks project file (the order does matter):</p>
<p><pre><code>&amp;lt;Linker&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add option=&quot;-Wl,-subsystem,console&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add option=&quot;-mconsole&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;mingw32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;ddraw&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;dsound&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;dxguid&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;ws2_32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;iphlpapi&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;wsock32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;liblibogg&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;liblibvorbis&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;liblibvorbisfile&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;zlib&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;jpeg&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;liblibpng&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;xerces-c&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;OpenAL32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;liblibcurl&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;winmm&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;gdi32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;opengl32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;glu32&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;SDL&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;SDLmain&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;lua5.1&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;streflop&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add library=&quot;glest&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add directory=&quot;../../source/win32_deps/lib&quot; /&amp;gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt;Add directory=&quot;../../source/win32_deps/xerces-c-src_2_8_0/lib&quot; /&amp;gt;
&amp;lt;/Linker&amp;gt;</code></pre><br />
Also what should you do if you program always produces stdout.txt and stderror.txt even though the application is a console application? It appears that this can happen due ti SDL taking convtrol of these streams. You can recompile SDL with:</p>
<p><code>./configure --disable-stdio-redirect</code></p>
<p>For more details check out: <a href="http://sdl.beuc.net/sdl.wiki/FAQ_Console">here</a></p>
<p>Another item that caused trouble was wxWidgets. I kept getting the following error after running configure:</p>
<p><code>./configure --target=i586-mingw32msvc --host=i586-mingw32msvc </code></p>
<p><pre><code>/home/softcoder/Code/megaglest/trunk/source/win32_deps/wxWidgets-2.8.10/bk-deps i586-mingw32msvc-gcc -c -o wxexpat_xmlparse.o -I./src/expat&nbsp;&nbsp; -I/home/softcoder/Code/megaglest/trunk/source/win32_deps/wxWidgets-2.8.10/lib/wx/include/i586-mingw32msvc-msw-ansi-release-2.8 -I./include -mthreads -Wall -Wundef -O2 -fno-strict-aliasing -mthreads ./src/expat/lib/xmlparse.c
./src/expat/lib/xmlparse.c:97:2: error: #error memmove does not exist on this platform, nor is a substitute available
./src/expat/lib/xmlparse.c: In function ‘XML_SetEncoding’:
./src/expat/lib/xmlparse.c:888: error: ‘isParamEntity’ undeclared (first use in this function)
./src/expat/lib/xmlparse.c:888: error: (Each undeclared identifier is reported only once
./src/expat/lib/xmlparse.c:888: error: for each function it appears in.)
./src/expat/lib/xmlparse.c:888: error: ‘externalParEntInitProcessor’ undeclared (first use in this function)
./src/expat/lib/xmlparse.c: In function ‘XML_SetReturnNSTriplet’:
./src/expat/lib/xmlparse.c:1110: error: ‘isParamEntity’ undeclared (first use in this function)
./src/expat/lib/xmlparse.c:1110: error: ‘externalParEntInitProcessor’ undeclared (first use in this function)
./src/expat/lib/xmlparse.c: In function ‘XML_SetParamEntityParsing’:
./src/expat/lib/xmlparse.c:1362: error: ‘isParamEntity’ undeclared (first use in this function)
./src/expat/lib/xmlparse.c:1362: error: ‘externalParEntInitProcessor’ undeclared (first use in this function)
make: *** [wxexpat_xmlparse.o] Error 1</code></pre></p>
<p>To fix this issue I had to edit the configure script and add the following:</p>
<p>ORIGINAL:</p>
<p><pre><code>OPTIMISE_CFLAGS=
if test &quot;$wxUSE_OPTIMISE&quot; = &quot;no&quot; ; then
&nbsp;&nbsp;&nbsp;&nbsp;if test &quot;$GCC&quot; = yes ; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O0&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
else
&nbsp;&nbsp;&nbsp;&nbsp;if test &quot;$GCC&quot; = yes ; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &quot;${host}&quot; in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*-pc-os2_emx | *-pc-os2-emx )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O2&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O2 -fno-strict-aliasing&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;esac
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
fi</code></pre></p>
<p>FIXED:</p>
<p><pre><code>OPTIMISE_CFLAGS=
if test &quot;$wxUSE_OPTIMISE&quot; = &quot;no&quot; ; then
&nbsp;&nbsp;&nbsp;&nbsp;if test &quot;$GCC&quot; = yes ; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O0&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
else
&nbsp;&nbsp;&nbsp;&nbsp;if test &quot;$GCC&quot; = yes ; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case &quot;${host}&quot; in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*-pc-os2_emx | *-pc-os2-emx )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O2&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*-*-cygwin* | *-*-mingw32* )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O2 -fno-strict-aliasing -DHAVE_MEMMOVE=1 -DXML_DTD&quot;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;=====================&amp;gt; MingW Fix Setup&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O2 -fno-strict-aliasing&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;esac
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OPTIMISE_CFLAGS=&quot;-O&quot;
&nbsp;&nbsp;&nbsp;&nbsp;fi
fi</code></pre></p>
<p>I re-ran configure and then make compiled everything properly.</p>
<p>For my project I successfully compiled:</p>
<p><pre><code>xerces-c
lua5.1
sdl
opengl
curl
openal
libpng
jpeg
zlib
libogg
libvorbis</code></pre></p>
<p><strong><br />
Part 2: Why is it a good idea to cross compile?</strong></p>
<p>If your software supports multiple platforms (like many &#8220;good&#8221; open source projects do), then you already know the answer. It can be a very tedious task to try to maintain code for multiple platforms especially if you cannot easily, quickly compile your code changes for the target platform in one development environment (and operating system). Some people use Virtual Machine Software (Like the highly recommended Virtual Box) but even this approach often leaves you feeling dirty, having to load up some version of Windows in your VM (assuming of course that you have a legit license, etc). All to offer a binary for those poor &#8220;entangled&#8221; windows users! </p>
<p>No more! Now we simply target the same code to the Windows platform and it builds the binaries using the MingW cross compiler! Now developers can focus on cross platform code with a purpose, and not worry so much about how to compile for those other platforms. This should open the doors for a broader audience for numerous open source projects (especially where build resources are limited). Add to this the installation of WINE (<a href="http://www.winehq.org/">here</a>) and you can also test the windows binary from your Linux environment. Lovely! This means you may support more users without compromising your coding morals.</p>
<p>Thanks, and I hope this helps others.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2010/12/06/freedom-at-last-linux-mingw-cross-compilers-endless-possibilies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VC++ 2008 express (vs2008) &#8211; fatal error C1085 &#8230; The parameter is incorrect.</title>
		<link>http://soft-haus.com/blog/2010/02/03/vc-2008-express-vs2008-fatal-error-c1085-the-parameter-is-incorrect/</link>
		<comments>http://soft-haus.com/blog/2010/02/03/vc-2008-express-vs2008-fatal-error-c1085-the-parameter-is-incorrect/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 19:07:17 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=430</guid>
		<description><![CDATA[Recently while trying to compile wxWidgets for the open source project glest, I kept getting errors in VC++ 2008 express edition related to pre-compiled headers. The errors were:
fatal error C1085 &#8230; The parameter is incorrect.
In my case the solution was found here (see Gary Gilbreath&#8217;s comment.. especially item #3)
I was compiling on a mapped network [...]]]></description>
			<content:encoded><![CDATA[<p>Recently while trying to compile <a href="http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide#Building_Single_Configurations" target="_blank">wxWidgets</a> for the open source project <a href="http://glest.org" target="_blank">glest</a>, I kept getting errors in <a href="http://www.microsoft.com/express/download" target="_blank">VC++ 2008 express edition</a> related to pre-compiled headers. The errors were:</p>
<p>fatal error C1085 &#8230; The parameter is incorrect.</p>
<p>In my case the solution was found <a href="http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/07ba35be-d0c7-4989-9bc1-edff61bfb556">here</a> (see Gary Gilbreath&#8217;s comment.. especially item #3)</p>
<p>I was compiling on a mapped network drive (in my case using <a href="http://www.virtualbox.org" target="_blank">VirtualBox&#8217;s</a> shared folders) and VS2008 does NOT like working on pre-compiled headers on network drives. The solution was to change the path of the pre-compiled headers from pointing to my mapped drive (w:) to c:\xx.pch</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2010/02/03/vc-2008-express-vs2008-fatal-error-c1085-the-parameter-is-incorrect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A house of cards &#8211; The Canadian Financial System</title>
		<link>http://soft-haus.com/blog/2010/02/01/a-house-of-cards-the-canadian-financial-system/</link>
		<comments>http://soft-haus.com/blog/2010/02/01/a-house-of-cards-the-canadian-financial-system/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 06:58:11 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=428</guid>
		<description><![CDATA[I have for some time had an interest and have studied financial systems for Canada and America. At first my interest came when I worked for an online stock trading company, at which time I took the Canadian Securities course (CSC) which I never completed.
I learned so much about the &#8220;real&#8221; side of the system [...]]]></description>
			<content:encoded><![CDATA[<p>I have for some time had an interest and have studied financial systems for Canada and America. At first my interest came when I worked for an online stock trading company, at which time I took the Canadian Securities course (CSC) which I never completed.</p>
<p>I learned so much about the &#8220;real&#8221; side of the system in those years (being included in conferences calls with brokers, etc). Since that time I have researched more heavily the history of the American and more recently the Canadian financial systems and have thus far concluded they are &#8220;By design&#8221; a disaster waiting to happen.</p>
<p>First allow me to discuss the Canadian side, the &#8220;Bank of Canada&#8221;. Taken from the Bank of Canada website here are some facts (irrelevant points skipped):</p>
<h5>1. 	What is the Bank of Canada?</h5>
<p>The Bank of Canada is the country&#8217;s central bank.  Its role, as  defined in the original  <a href="http://www.bankofcanada.ca/pdf/act_loi_boc_bdc.pdf">Bank of  Canada Act</a> of 1934, is &#8220;to promote the economic and financial  welfare of Canada.&#8221;</p>
<h5>3. Who owns the Bank of Canada?</h5>
<p>The Bank was founded in 1934 as a privately owned corporation.  In  1938, the Bank became a Crown corporation belonging to the federal  government.  Since that time, the Minister of Finance has held the  entire share capital issued by the Bank.</p>
<h5>4. Is the Bank of Canada a government department?</h5>
<p>No, it is a special type of Crown corporation. The Bank has  considerable autonomy to carry out its responsibilities.</p>
<h5>5. Why do we need a central bank?</h5>
<p>The Bank of Canada was created to be the sole issuer of bank notes  and to facilitate management of the country&#8217;s financial system.</p>
<p>Having an independent monetary institution allows for the separation  of the power to spend money from the power to create money.</p>
<p>Separating the central bank from the political process enables it to  adopt the medium- and long-term perspectives essential to conducting  effective monetary policy.</p>
<h5>7. Can I file a complaint with the Bank of Canada regarding a bank?</h5>
<p>No. The Bank of Canada does not play any part in the regulation or  daily administration of commercial banks.  To file such a complaint,  contact the <a href="http://www.fcac-acfc.gc.ca/eng/consumers/Complaints/default.asp">Financial  Consumer Agency of Canada</a>.</p>
<p>and last (but certainly NOT least)&#8230;</p>
<h5>8. How does the Bank of Canada pay its operating expenses?</h5>
<p>The revenues generated by the Bank each year greatly exceed its  operating expenses.</p>
<p>The revenues derive from the Bank of Canada&#8217;s role as the issuer  of bank notes to Canada&#8217;s financial institutions.  Institutions pay the  Bank when they withdraw bank notes from it. The Bank then invests these  funds in government bonds and treasury bills. The interest earned on  these investments is the Bank&#8217;s main source of revenue.</p>
<p>The difference between the interest the Bank earns and its operating  expenses is its net profit, which is given to the federal government.  In recent years this profit has averaged about $1.7 billion annually.</p>
<p>This process, whereby a central bank earns revenue in exchange  for its role as the issuer of a country&#8217;s currency, is called <a href="http://www.bankofcanada.ca/en/backgrounders/bg-m3.html"><em>seigniorage</em></a>.</p>
<p>Here is some food for thought:</p>
<p>The purpose of the central bank in Canada is <strong>&#8220;to promote the economic and financial  welfare of Canada.&#8221;. In  1938, the Bank became a Crown corporation belonging to the federal   government.</strong> Is the Central Bank a government run department? <strong>No, it is a special type of Crown corporation. The Bank has   considerable autonomy to carry out its responsibilities. The Bank of Canada was created to be the sole issuer of bank notes  and  to facilitate management of the country&#8217;s financial system.</strong></p>
<p>In some ways this may sound very noble, but something just feels wrong. How does this central bank make money and how do the private banks make money and who is affected?</p>
<p><strong>The revenues derive from the Bank of Canada&#8217;s role as the issuer  of  bank notes to Canada&#8217;s financial institutions.  Institutions pay the   Bank when they withdraw bank notes from it. The Bank then invests these   funds in government bonds and treasury bills. The interest earned on   these investments is the Bank&#8217;s main source of revenue.</strong></p>
<p>So lets try to understand this. The central bank prints money (bank notes) and is the &#8220;sole issuer&#8221;. The more they print, the less each dollar is worth that is sitting in my bank account and my wallet (that is called inflation). Who creates inflation? The central bank does (not you and me). Why is our money worth less? Because each time they print notes, there is nothing backing the value of those notes (like gold or other real goods) so as they introduce more notes, it de-valuates the existing notes (like what happened in Germany during the world wars).</p>
<p>So the bank &#8220;issues&#8221; bank notes to &#8220;financial institutions&#8221;. What did it cost the bank to print these notes, or rather &#8220;issue&#8221; notes (think of the cost of introducing numbers into a computer). Almost nothing compared to the value of that note. It was virtually &#8220;for free&#8221; to create that money and lend it to private banks.</p>
<p>Now lets say the central bank lends $1.00 Canadian to a private bank and charges them $0.05 to do  so. In order for that bank to pay that fee and make profit, they lend it to you and me by charging the original fee of $0.05 + their profit margin (say $0.15) = the cost for you and I $1.20.</p>
<p>My question is why should these banks essentially &#8220;for free&#8221; make money from us? Why can&#8217;t we get in at the $0.05 on the dollar? Why are we dealing with usury middle-men who get the privilege of charging us for something they didn&#8217;t earn, they got $0.15 on the dollar for doing nothing! Further more when these banks fail, it almost always ends up with a bail-out of some kind (it HAS to since there is nothing to back these notes in the first place, unless you count the fact they liquidate all of your assets when you declare bankruptcy).</p>
<p>Next the central bank takes that $0.05 for each dollar lent to private banks and &#8220;invests&#8221; it in Bonds and T-Bills. These are primarily bought up my foreign investors and private banks. Essentially by design the central bank %100 relies on the private banks and the private banks %100 rely on the central bank. Each will NEVER allow the others to disappear. While the purpose of the central bank is to separate the politic process from the monetary system, its purpose is ALSO: <strong>Having an independent monetary institution allows for the separation   of the power to spend money from the power to create money.</strong></p>
<p>This separation clearly DOES NOT EXIST!</p>
<p>Perhaps another time I will discuss the American System, which might I say is &#8220;the cavalier of all systems&#8221;. Canada is quite mild in comparison to the American counterpart. For starters <a title="look here" href="http://www.bloomberg.com/apps/news?pid=20601039&amp;sid=aaIuE.W8RAuU" target="_blank">look here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2010/02/01/a-house-of-cards-the-canadian-financial-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>network: Firewall authentication: site= protocol=http, prompt=, scheme=ntlm &#8211; How to get applets loading in Linux</title>
		<link>http://soft-haus.com/blog/2009/12/04/network-firewall-authentication-site-protocolhttp-prompt-schementlm-how-to-get-applets-loading-in-linux/</link>
		<comments>http://soft-haus.com/blog/2009/12/04/network-firewall-authentication-site-protocolhttp-prompt-schementlm-how-to-get-applets-loading-in-linux/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 18:56:46 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=406</guid>
		<description><![CDATA[I do a lot of work these days in Java and recently I wanted to be able to test a web application that uses Java Applets from my Ubuntu Karmic client. When loading the first applet and viewing the Applet Console window I noticed Firefox would hang and the last line in the console was:
network: [...]]]></description>
			<content:encoded><![CDATA[<p>I do a lot of work these days in Java and recently I wanted to be able to test a web application that uses Java Applets from my Ubuntu Karmic client. When loading the first applet and viewing the Applet Console window I noticed Firefox would hang and the last line in the console was:</p>
<p>network: Firewall authentication: site= protocol=http, prompt=, scheme=ntlm</p>
<p>It seems there is a bug in the JDK version for Linux (and MAC OSX) when it comes to NTLM. If you have access to the webserver that serves the web application and it happens to be IIS, remove Integrated Windows Authentication and viola&#8230; Linux works with your applets.</p>
<p><img class="aligncenter size-full wp-image-407" title="IIS-1" src="http://soft-haus.com/blog/wp-content/uploads/2009/12/IIS-1.png" alt="IIS-1" width="501" height="758" /></p>
<p><img src="file:///tmp/moz-screenshot.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/12/04/network-firewall-authentication-site-protocolhttp-prompt-schementlm-how-to-get-applets-loading-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMTP failure in Thunderbird using Hotmail? Wacky solution!</title>
		<link>http://soft-haus.com/blog/2009/09/16/smtp-failure-in-thunderbird-using-hotmail-wacky-solution/</link>
		<comments>http://soft-haus.com/blog/2009/09/16/smtp-failure-in-thunderbird-using-hotmail-wacky-solution/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 22:56:31 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=395</guid>
		<description><![CDATA[First Follow the steps here. I found that no matter how hard I tried to fix &#8220;Sending&#8221; emailing using my hotmail account did not solve the issue. I tried a wacky step and it solved my problem:
In Thunderbird goto:
Edit-&#62;Account Settings-&#62;Outgoing Server (SMTP)
and select your hotmail server (smtp.live.com) and click edit
Now just UNCHECK the &#8220;Use name [...]]]></description>
			<content:encoded><![CDATA[<p>First Follow the steps <a title="here" href="http://blogs.howtogeek.com/mysticgeek/2009/03/16/how-to-add-hotmail-to-thunderbird/" target="_blank">here</a>. I found that no matter how hard I tried to fix &#8220;Sending&#8221; emailing using my hotmail account did not solve the issue. I tried a wacky step and it solved my problem:</p>
<p>In Thunderbird goto:</p>
<p>Edit-&gt;Account Settings-&gt;Outgoing Server (SMTP)</p>
<p>and select your hotmail server (smtp.live.com) and click edit</p>
<p>Now just UNCHECK the &#8220;Use name and password&#8221;, then RECHECK that checkbox and click OK.</p>
<p>Now if you try to send an email (MAKE SURE the FROM: dropdown is your hotmail account too) thunderbird should RE-ASK you for your hotmail password (And you can save it to the cache) and voila, the problem is fixed.</p>
<p>I did this in Ubuntu 9.04 (Jaunty)</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/09/16/smtp-failure-in-thunderbird-using-hotmail-wacky-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What about &#8220;moral debt&#8221; or the &#8220;moral backlog&#8221;? (Tales from an agile managerie)</title>
		<link>http://soft-haus.com/blog/2009/09/08/what-about-moral-debt-or-the-moral-backlog-tales-from-an-agile-managerie/</link>
		<comments>http://soft-haus.com/blog/2009/09/08/what-about-moral-debt-or-the-moral-backlog-tales-from-an-agile-managerie/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 04:11:25 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=393</guid>
		<description><![CDATA[We have backlogs in Agile and we have technical debt, but what about &#8220;moral debt&#8221;?
What I am refering to is the phenomenon of things, actions, people, decisions which lead to a bad moral outcome. A bad moral outcome could be something that&#8221;de-moralizes&#8221; team members, or it could be &#8220;ethically immoral&#8221; or anything else that makes [...]]]></description>
			<content:encoded><![CDATA[<p>We have backlogs in Agile and we have technical debt, but what about &#8220;moral debt&#8221;?</p>
<p>What I am refering to is the phenomenon of things, actions, people, decisions which lead to a bad moral outcome. A bad moral outcome could be something that&#8221;de-moralizes&#8221; team members, or it could be &#8220;ethically immoral&#8221; or anything else that makes you feel dirty that you did it (skipping that unit test in order to increase velocity). You all know what I am talking about because at some point or other you have been there. We track everything that higher management wants to see to turn people into micro resources but I have never heard of anything in Agile &#8220;designed to improve morality&#8221;.</p>
<p>Since Agile is supposed to be all about high quality at a lean cost, one would think that satisfaction of employees in their job should create a big part of the overall equation since it affects quality. We are usually supposed to value &#8220;people&#8221; over a &#8220;process&#8221;. Personally I&#8217;m tired of catch phrases and pretenses and &#8220;new ways&#8221; of doing things when the reality at the end of the day always ends up the same&#8230; &#8220;work harder not smarter&#8221;. The &#8220;moral debt&#8221; is always present whether we accept its existence or not. People keep track of it in their minds and hearts and it affects their productivity and loyalty.</p>
<p>Unfortunately the typical North American focus in business revolves around making money and not around making X (the product you make). Instead of worrying about competition from China, maybe we need to build a quality product that will last longer than a pack of bubble gum! More and more people are seeing how the &#8220;deals&#8221; they thought they were getting were not deals at all. That old Ford that used to last 20 years is breaking down the next week after its 10 year warranty has expired. That netbook (and even regular laptops too) with its cheesy 1 year warranty is as disposable as my children&#8217;s diapers.</p>
<p>Do your reasearch and support high quality products (and promote them). Vote with your wallet and word of mouth, and be a part of the solution to this current crisis. Spend &#8220;smarter not harder&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/09/08/what-about-moral-debt-or-the-moral-backlog-tales-from-an-agile-managerie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to replace a file in a JAR file &#8211; Java Archive</title>
		<link>http://soft-haus.com/blog/2009/09/02/how-to-replace-a-file-in-a-jar-file-java-archive/</link>
		<comments>http://soft-haus.com/blog/2009/09/02/how-to-replace-a-file-in-a-jar-file-java-archive/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 20:01:33 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=389</guid>
		<description><![CDATA[While the answer seems to be very elusive it appears to be quite simple. The java jar tool is required (part of the jdk I believe) and it can be used like this:
jar uf myJarFile.jar com\vsoft\servlet\myServlet.class
This will replace the class myServlet.class inside the myJarFile.jar with a new one located in com\vsoft\servlet\myServlet.class
You may open the jar [...]]]></description>
			<content:encoded><![CDATA[<p>While the answer seems to be very elusive it appears to be quite simple. The java jar tool is required (part of the jdk I believe) and it can be used like this:</p>
<p>jar uf myJarFile.jar com\vsoft\servlet\myServlet.class</p>
<p>This will replace the class myServlet.class inside the myJarFile.jar with a new one located in com\vsoft\servlet\myServlet.class</p>
<p>You may open the jar in winzip / 7zip to see that it in fact replaced the class with a new date/time. If you do not properly match the full path of the original class within the original jarfile it will ADD the class into the jar instead of replacing the original class so be sure to properly create the full path to the updated class.</p>
<p>I stumbled across some helpful info from <a title="here" href="http://stackoverflow.com/questions/946071/re-compile-a-java-class-from-jar" target="_blank">here</a> which was the basis for this posting.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/09/02/how-to-replace-a-file-in-a-jar-file-java-archive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using a USB Scanner in Linux (Ubuntu Jaunty 9.04)</title>
		<link>http://soft-haus.com/blog/2009/08/28/using-a-usb-scanner-in-linux-ubuntu-jaunty-9-04/</link>
		<comments>http://soft-haus.com/blog/2009/08/28/using-a-usb-scanner-in-linux-ubuntu-jaunty-9-04/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 03:20:07 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=386</guid>
		<description><![CDATA[These days I find myself spending a little extra time researching my hardware purchases to ensure they work with Linux (since we now nearly exclusively run Ubuntu in our house). A few names that seem &#8220;friendly&#8221; towards Linux are Brother, Epson, LinkSys, DLink and sometimes HP. My pick for a scanner was the Epson Perfection [...]]]></description>
			<content:encoded><![CDATA[<p>These days I find myself spending a little extra time researching my hardware purchases to ensure they work with Linux (since we now nearly exclusively run Ubuntu in our house). A few names that seem &#8220;friendly&#8221; towards Linux are Brother, Epson, LinkSys, DLink and sometimes HP. My pick for a scanner was the Epson Perfection V300 Photo Scanner. I got it up and running in 10 minutes running XSane and some dependent packages that support Epsom scanners.</p>
<p>It can be a challenge sometimes to find hardware that runs with Linux so be very careful when you do want to purchase a device, whether it be an MP3 player, a printer, a scanner, or a modem you need to keep in mind that your loved device is as useful as cow manure if not supported on your primary operating system. Take the time to research and review before you buy to find the best device at the best price and a good warranty as well.</p>
<p>I give the Epson Perfection v300 a 4 of 5 star rating. the V500 is too pricy in my opinion and only offers higher resolution scanning (which is hardly noticeable unless you are doing professional work with photos or something). Although I like Canon hardware, avoid them when it comes to Linux as they are not &#8220;Linux Friendly&#8221; in most cases which is unfortunate.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/08/28/using-a-usb-scanner-in-linux-ubuntu-jaunty-9-04/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is the ER similar to software bug fixing?</title>
		<link>http://soft-haus.com/blog/2009/07/26/is-the-er-similar-to-software-bug-fixing/</link>
		<comments>http://soft-haus.com/blog/2009/07/26/is-the-er-similar-to-software-bug-fixing/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 00:26:19 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=340</guid>
		<description><![CDATA[Friday evening was a long wait. My son Timothy (despise not his youth) ran his bar foot into a pitch fork. We made out way to the emergency dept in Salmon Arm, BC and the next 3.5 hours felt strangely familiar!
I watched people walk into the ER and get &#8220;triaged&#8221; just like defects in software [...]]]></description>
			<content:encoded><![CDATA[<p>Friday evening was a long wait. My son Timothy (despise not his youth) ran his bar foot into a pitch fork. We made out way to the emergency dept in Salmon Arm, BC and the next 3.5 hours felt strangely familiar!</p>
<p>I watched people walk into the ER and get &#8220;triaged&#8221; just like defects in software get &#8220;prioritized&#8221;. There was a diagnosis and the &#8220;issue&#8221; was put into the queue (or waiting room in this case). It was amazing to see the similarities having worked in software development for over 15 years I could almost anticipate some of the events that would happen. As I mentioned in my previous blog there was the ever important question (and this time it is more important to answer in the ER) regarding quantity or quality treatment of the &#8220;Bug&#8221;. The ER was filling up fast with motor vehicle accidents, but also with cases that definitely did not need to be in the queue. &#8220;Bugs&#8221; that get into the queue slow down everything for everyone (except for the critical bugs that get addressed immediately).</p>
<p>It is harder to measure quality when it comes to the ER. In our case we arrived and were placed into the queue at 8:30pm, and were seen by the doctor at 11:30pm to finally receive the &#8220;fix&#8221; for Timothy&#8217;s wound. But one thing that I couldn&#8217;t help but notice was the atmosphere being &#8220;work harder not smarter&#8221;. Take for example the people in the bed beside us. An elderly man was in a car accident and was having tremendous difficulty trying to stand up. The hospital staff did not once offer to keep him longer until he could walk but kept encouraging him to take time and get up. In the end the couple ended up getting a local hotel room and the hospital gave them valium to ease the pain.</p>
<p>When I say &#8220;we want quality&#8221; this applies to every aspect of life doesn&#8217;t it? I find it unfortunate that our rare visit to the ER brought strangely familiar feelings, feelings from a distant land of cut-throat budgets, layoffs and numbers games all making sense in the minds of a small handful of individuals but not making sense to anyone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/07/26/is-the-er-similar-to-software-bug-fixing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DLINK DNS323 NAS &#8211; stories from the trenches (the 94% bug strikes again)</title>
		<link>http://soft-haus.com/blog/2009/06/27/dlink-dns323-nas-stories-from-the-trenches-the-94-bug-strikes-again/</link>
		<comments>http://soft-haus.com/blog/2009/06/27/dlink-dns323-nas-stories-from-the-trenches-the-94-bug-strikes-again/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 03:29:31 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=332</guid>
		<description><![CDATA[We have been using the marvellous DLINK DNS323 NAS (network attached storage) device on our family network for years now. This device has become the most important part of our digital record keeping. A week ago one of my sons lost his hard drive on his Ubuntu Linux box as the motor died. I felt [...]]]></description>
			<content:encoded><![CDATA[<p>We have been using the marvellous DLINK DNS323 NAS (network attached storage) device on our family network for years now. This device has become the most important part of our digital record keeping. A week ago one of my sons lost his hard drive on his Ubuntu Linux box as the motor died. I felt quite sorry for him and order some new parts, but in the meantime I decided to expedite the recovery process of his Linux box.</p>
<p>Since our DNS323 stores very important information I had setup two Western Digital Caviar Black 1TB hardrives in a RAID 1 configuration. I decided to take the backup drive out of the DNS323 and use it as the replacement drive for my son&#8217;s Ubuntu and got him up and running within a few hours (he was very happy). A number of days later our shipment of replacements parts arrived (one of which was an identical Western Digital Caviar Black 1 TB drive). I placed the drive into the empty slot (the one on the right hand side) of the DNS323 and followed the prompts in the web configuration page to format the drive as a RAID 1 backup drive. After a few hours i came back to see it seemed stuck at 94% so I checked out on google to see if this was a known issue. Indeed this was a known bug in firmware v 1.06 and the suggestion was to keep trying the format until it works.</p>
<p>Here is where things went bad quickly! After trying the format process 2-3 times and still getting stuck at 94% I thought I would swap the drives place in the DNS323 and did so. I used extreme caution (writing down the new hard drives serial #) while going through the entire process. The next format attempt the firmware said it would format the drive with the NEW serial number but unfortunately due to ANOTHER NASTY BUG in the firmware it formatted the drive in the right hand bay (with all of our data).</p>
<p>Here is what the drive looked like after it was reformatted when I viewed it in Ubuntu&#8217;s Partition Manager:</p>
<div id="attachment_333" class="wp-caption aligncenter" style="width: 793px"><img class="size-full wp-image-333" title="Screenshot--dev-sdb - GParted" src="http://soft-haus.com/blog/wp-content/uploads/2009/06/Screenshot-dev-sdb-GParted.png" alt="The drive looks like this when it was partially formatted by the DNS323" width="783" height="528" /><p class="wp-caption-text">The drive looks like this when it was partially formatted by the DNS323</p></div>
<p>Sadly I tried using a number of data recovery tools like testdisk, gparted, ddrescue etc&#8230; but nothing was to help us out of this dilemma. Well we lost a LOT of important stuff to say the least but we all agreed it was a lesson learned and would never be repeated again. We would use FANATICAL caution from now on when dealing with the DNS323 and never use its components for anything other than it sole purpose.</p>
<p>I should mention that afterwards I downloaded the v1.08 beta firmware and it did NOT suffer from the original 94% bug and formatted the second drive just fine. I wish I had known about that before as it would have saved MUCH GRIEF.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/06/27/dlink-dns323-nas-stories-from-the-trenches-the-94-bug-strikes-again/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Soft-haus.com&#8217;s new Wiki &#8211; IPTables Bandwidth Monitor for starters</title>
		<link>http://soft-haus.com/blog/2009/05/21/soft-hauscoms-new-wiki-iptables-bandwidth-monitor-for-starters/</link>
		<comments>http://soft-haus.com/blog/2009/05/21/soft-hauscoms-new-wiki-iptables-bandwidth-monitor-for-starters/#comments</comments>
		<pubDate>Fri, 22 May 2009 06:26:34 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=322</guid>
		<description><![CDATA[The home for all documentation related to the IPTables bandwidth monitor project is now located here. This should be a useful resource for all users wanting to know about how to install, configure and use this useful tool.
]]></description>
			<content:encoded><![CDATA[<p>The home for all documentation related to the IPTables bandwidth monitor project is now located <a href="http://www.soft-haus.com/wiki/index.php5?title=IPTables_Bandwidth_Monitor" target="_blank">here</a>. This should be a useful resource for all users wanting to know about how to install, configure and use this useful tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/05/21/soft-hauscoms-new-wiki-iptables-bandwidth-monitor-for-starters/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>My first launchpad.net project, ipt-parse finds an offical home</title>
		<link>http://soft-haus.com/blog/2009/05/20/my-first-launchpadnet-project-ipt-parse-finds-an-offical-home/</link>
		<comments>http://soft-haus.com/blog/2009/05/20/my-first-launchpadnet-project-ipt-parse-finds-an-offical-home/#comments</comments>
		<pubDate>Thu, 21 May 2009 07:49:48 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=315</guid>
		<description><![CDATA[For the past few months I&#8217;ve been working on extending my WRT54GL LinkSys Router (which runs the excellent Tomato firmware) to add the ability to monitor per client bandwidth usage on our family network to the Internet. As is the trand, our ISP caps our monthly bandwidth usage and therefore we need to know eho [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few months I&#8217;ve been working on extending my WRT54GL LinkSys Router (which runs the excellent <a href="http://www.polarcloud.com/tomato" target="_blank">Tomato</a> firmware) to add the ability to monitor per client bandwidth usage on our family network to the Internet. As is the trand, our ISP caps our monthly bandwidth usage and therefore we need to know eho (if anyone) in the family is hogging that precious bandwidth. The fruit of my labour (Called ipt-parse) has  officially moved to the launchpad.net website <a href="http://www.launchpad.net/ipt-parse" target="_blank">here</a>. This is my first experiment using launchpad to host one of my projects. I have experience with sourceforge.net, code.google.com and now launchpad.net</p>
<p>So far I REALLY enjoy using the version control system (called <a href="http://bazaar-vcs.org/" target="_blank">bazaar</a>). This will be they first &#8220;distributed&#8221; version control system I have used. Launchpad.net offers many excellent tools for open source projects and I look forward to blogging more about my experience as I encounter more.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/05/20/my-first-launchpadnet-project-ipt-parse-finds-an-offical-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Status updates</title>
		<link>http://soft-haus.com/blog/2009/05/10/status-updates/</link>
		<comments>http://soft-haus.com/blog/2009/05/10/status-updates/#comments</comments>
		<pubDate>Sun, 10 May 2009 19:27:43 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=294</guid>
		<description><![CDATA[Too many things are going on and all at the same time. Before I forget, I thought it would be good to write about some of the things taking place.
Tomato firmware:
Fresh on my mind is the Tomato firmware updates that I mentioned earlier. The Tomato firmware is a packaged piece of software that runs many [...]]]></description>
			<content:encoded><![CDATA[<p>Too many things are going on and all at the same time. Before I forget, I thought it would be good to write about some of the things taking place.</p>
<p><a href="http://www.polarcloud.com/tomato" target="_blank">Tomato firmware</a>:</p>
<p>Fresh on my mind is the Tomato firmware updates that I mentioned earlier. The Tomato firmware is a packaged piece of software that runs many popular Linux based routers (like the WRT54GL). I&#8217;m starting to purposefully purchase devices that run Linux so that I can customize them to do what I like. In recent weeks I have have distracted from other projects due to an important need to add a new feature to my WRT54GL router, namely adding bandwidth monitoring for each device on our family network. Our Internet Service Provider (ISP) limits the total monthly bandwidth that we are allowed to consume, so the need to track who is using bandwidth is very important for us (especially since I work from my home office most of the week).</p>
<p>A few weeks ago I wrote a small utility (cross compiled using the Tomato based tool-chain) called ipt-parse. This tool takes the output of: iptables -L xx -vnx and produces summary statistics. This was perfect to accomplish my goal of tracking bandwidth per client, but the v1 of the tool relied on reading the contents of numerous logfiles produced by the iptables output. As time passes, there would be many logfiles and that would clutter the file-system  so I decided to find a more permanent solution, a mini database. My first thought was to use something that was designed for a small footprint, <a href="http://www.sqlite.org/" target="_blank">sqlite</a>. This proved to be a BIG challenge, not entirely due to sqlite but many factors as I shall describe. Within a day I managed to modify some of the sqlite compiler DEFINE statements and successfully cross-compiled sqlite to run in the tomato shell environment. While the application would run successfully, I kept noticing that sqlite would give me lock and disk i/i errors whenever I tried to execute a command that would access a database such as:</p>
<p>access permission denied</p>
<p>disk I/O error</p>
<p>Reading through various discussion groups had wasted a lot of time (but was an excellent learning process, especially related to low level file system I/O). At first I was led to believe that this was related to my specific environment which was:</p>
<p>Router (LinkSys WRT54GL): running Linux Kernel 2.4, Busybox 1.12, cifs client</p>
<p>NAS (Dlink <a href="http://wiki.dns323.info/" target="_blank">DNS323</a>): running Linux Kernel 2.6, Busybox 1.12, Samba Server 3.0.24</p>
<p>The router was acting as a client using a cifs mount to connect to the NAS which was running samba server. When running sqlite on the mounted cifs share I would see the errors, but when running on the local router file-system I would not have any problems! After searching around I found <a href=" http://bugs.debian.org/483507" target="_blank">this</a> defect reported by Daniel Kahn Gillmor. After a friendly and helpful exchange of dialog with both Daniel and a Samba Server developer (Shirish S Pargaonkar) I was able to discover a little bit more detail surrounding this defect. Shirish recommended I update my Samba Server version if possible (so I did as I am able to update packages on my DNS323!). After successfully upgrading the NAS to Samba 3.3.2 and trying out the locking issue, the error reported by sqlite was different but the underlying problem was the same! Due to being stuck with the old Linux 2.4 Kernel on the Router (because some of the device drivers are binary only and won&#8217;t work on newer Kernels) I was not able to update the cifs code to use any new bug fixes (which were all based on newer Linux Kernel changes). I tried completely disabling locking on the share used by the router in my smb.conf on the NAS Samba Server and that fixed the error reported by the testlock.c program mentioned in the Debian bug, but still had problems in sqlite (not that I wanted to have to do this as the solution anyways). After having a useful dialog with Shirish realted to cifs and Samba Server communication and behaviour we realized that this old cifs client did not support the newer communication protocol with Samba Server and thus Samba Server was assuming that the client was a Windows client. Running the exact same applications from my Ubuntu box proved that there was something specific to the router software that caused the problem as Ubuntu did NOT have this problem.</p>
<p>Eventually I passed back and forth thinking of scrapping sqlite and using something like mysqlclient library and running mysql on the NAS (and thus avoiding direct file-system access), but trying to get the mysqlclient library compiled in tomato is no small task (this was clearly not what I wanted to spend my time working on). Finally I applied some of the lessons I learned while debugging the locking issues in cifs / samba and looked carefully at the sqlite code and #define entities. Viola, a solution:</p>
<p>First the compiler settings:</p>
<p>@$(CC) $(CFLAGS) -o ipt-parse -L. src/ipt-parse.c src/sqlite3.c -ldl -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_LOCKING_STYLE=1 -DSQLITE_DISABLE_DIRSYNC -DSQLITE_NO_SYNC</p>
<p>Secondly I discovered that sqlite attempts to use posix style locking for all non Apple and VxWorks Operating Systems (this is decided at compile time). Fortunately there are multiple locking mechanisms in sqlite, and the FIRST one in the list of locking types gets used so I changed it from posix to dotfile locking by moving this entry to the top:</p>
<p>static sqlite3_vfs aVfs[] = {<br />
UNIXVFS(&#8220;unix-dotfile&#8221;,  dotlockIoFinder ),</p>
<p>Suddenly sqlite was working beautifully on the Linux 2.4 based router. Now that I have a working solution with sqlite, I have added the ability to save output directly from iptables -L into a sqlite database, and also the ability to query the database and produce statistics. Due to the way in which i have this add-on working, it is fairly fail-safe and self contained. It runs via a scheduled job in Tomato and saves data on a cifs share (which for any serious users should be something like my DLink DNS323 NAS which runs 24/7). Once this data is logged (I have my cron job set to save iptables stats every 5 minutes) I can query the statistics using a vast array of querying possibilities up to the granularity on 5 minute intervals (the interval is directly proportionate to the frequency of the cron job saving the stats). Once the logging code has proven to run stable and accurately, I&#8217;ll be able to add things like event triggers (email me when a client reaches x GB&#8217;s of traffic flow within x minutes of time). The data analysis side should likely be coded in something separate from the Tomato environment (due to flexibility requirements) but be easy enough to use on many accessible platforms. My idea is to partition the work into two parts: a) the data collection and summary view that runs directly from Tomato (written in C) and b) the data analysis part which provides a robust and flexible platform to show numerous views of the collected data (perhaps a web based interface using PHP for portability). This will open up a whole new world of statistical analysis possibilities and should prove to offer great value as it improves over time (a new download is now available from: <a href="http://soft-haus.com/blog/free-software-downloads/" target="_blank">here</a>).</p>
<p><a href="http://glest.org/en/index.php" target="_blank">Glest</a>:</p>
<p>After having spent a bit of time in the past looking through the code for this strategy game, we decided to a) <a href="http://glest.org/glest_board/index.php?topic=4252.0" target="_blank">fix a few bugs</a> that were affecting our multi-player experience and b) the boys learned about <a href="http://en.wikipedia.org/wiki/3d_modeling" target="_blank">making 3D models</a> in <a href="http://www.blender.org/" target="_blank">blender</a> so that we could change some of the game content for our own use. We ended up releasing the <a href="http://glest.org/glest_board/index.php?topic=4261.0" target="_blank">Farmer Faction</a> and since then the boys have been continuing there efforts in creating more content. Once this content has been refined we may post it for public download.</p>
<p>Teamfest:</p>
<p>About 6 months ago I mentioned our need to find a good <a href="http://digitalpaint.planetquake.gamespy.com/news.php" target="_blank">digial paintball 2</a> replacement that we could actually have access to all the code and be able to contribute to. <a href="http://www.bloodfrontier.com/" target="_blank">Blood Frontier</a> was the engine we decided to base our replacement on. Fortunately we got involved shortly before <a href="http://qreeves.googlepages.com/" target="_blank">Quinn</a> and company were ready to release and we offered ideas and a minor bug fix (again related to local multi-player LAN play). Quinn ended up adding a kid&#8217;s mode and paintball option to the game, which showed me that this project was &#8220;open&#8221; for business as in Open Source. While we have not spent much time on &#8220;Teamfest&#8221; lately we are just starting to ramp up our efforts to produce something that satisfies our previous paintball experience. The boys are making maps and starting to create more detailed models for Teamfest, while I will begin combing through the code and soon we&#8217;ll put together a design plan.</p>
<p>Family:</p>
<p>Our family is a happy one. One important family goal is to be debt free. This goal took real shape in the summer of 2008. We have been implementing many things to attempt a more modest lifestyle whereby we would not require to borrow. This would free our availability even further for doing God&#8217;s Will and spending time with each other. We have experienced a number of personal disappointments in recent months, but we also recognize that the Lord over-sees it all. This brings us great comfort. In the meantime we are doing what we can, and leaving the rest in god&#8217;s hands and trying to to fret about it.</p>
<p>That&#8217;s all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/05/10/status-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help I&#8217;m stuck using decades old technology! Tales of a 16 bit sql server client connecting to a named instance server.</title>
		<link>http://soft-haus.com/blog/2009/04/30/help-me-im-stuck-with-using-decades-old-technology-today-tales-of-16-bit-sql-server-client-connecting-to-a-named-instance-server/</link>
		<comments>http://soft-haus.com/blog/2009/04/30/help-me-im-stuck-with-using-decades-old-technology-today-tales-of-16-bit-sql-server-client-connecting-to-a-named-instance-server/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 21:57:12 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=289</guid>
		<description><![CDATA[Lets face it no matter where you work, if you&#8217;ve been there long enough you find out that some piece of legacy software (perhaps an internal tool) is still being used but hasn&#8217;t been updated for a decade or two. Think about all those versions of the .NET framework dating back to 1.1 and 1.0, [...]]]></description>
			<content:encoded><![CDATA[<p>Lets face it no matter where you work, if you&#8217;ve been there long enough you find out that some piece of legacy software (perhaps an internal tool) is still being used but hasn&#8217;t been updated for a decade or two. Think about all those versions of the .NET framework dating back to 1.1 and 1.0, but let me take you all back to a distant time, a time where integers could actually contain the average debt of the typical citizen (32767), yes I&#8217;m talking about the days of 16 bit software. These days included Borland C++, Turbo C, Microsoft Quick C, Watcom C, etc.</p>
<p>Today I was asked to find out what would be required to get an old 16 bit tool working with SQL Server named instances (imagine the madness in such a request)! The good news is that it is possible. I&#8217;ll try to save you the wasted time and cut to the main points.</p>
<p>1. When you install named instances on a Server running SQL Server each named instance gets allocated a dynamic port # (tcpip) or a dynamic named pipe. To find out the port # that matches a given named instance check out this link <a href="http://www.databasejournal.com/features/mssql/article.php/3764516/Discover-SQL-Server-TCP-Port.htm" target="_blank">here</a>.</p>
<p>Below I have pasted the important parts:</p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong><span style="text-decoration: underline;">SQL Server 2000</span></strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong>Default instance</strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\SuperSocketNetLib\TCP</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong>Named instance</strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\(InstanceName)\MSSQLServer\SuperSocketNetLib\TCP</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong><span style="text-decoration: underline;">SQL Server 2005</span></strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">There is no distinction between default and named instances. An instance is assigned a number based on the order it was installed. We first need to locate the registry key for the instance, which looks like</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.#</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"># is the number assigned to the instance. The instance name is stored as the default value for this registry key. For a default instance, it is MSSQLSERVER.</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">Once the registry key for the instance is found, we know the TCP/IP registry key is</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.#\MSSQLServer\SuperSocketNetLib\TCP\IPAll</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong><span style="text-decoration: underline;">SQL Server 2008</span></strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong>Default instance</strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\TCP\IPAll</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><strong>Named instance </strong></span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.(InstanceName)\MSSQLServer\SuperSocketNetLib\TCP\IPAll</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">However, if two SQL Server products exist on one host, then the location of the registry key could differ from above. For example, if SQL Server 2005 or 2008 are installed on the same host after SQL Server 2000, then the TCP/IP registry key of SQL Server 2005 or 2008 will follow the SQL Server 2000 format. Say, if a SQL Server 2000 instance INST2000 and a SQL Server 2005 instance INST2005 are installed on a host sequentially, then the registry key for the TCP/IP protocol of the SQL Server 2005 instance would reside at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\INST2005\MSSQLServer\SuperSocketNetLib\TCP, not HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib\TCP\IPAll.</span></span></p>
<p><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">2. Now that you have found the port # that is associated to the named instance you want to connect to from your cheesy 16 bit client, simply change the servername to: myserver,12345 (substitue myname and 12345 with the actual server name and the port # you found in step #1) and voila, your 16 bit application can talk to named instances.</span></span><br />
<span><span style="font-family: Verdana,Arial,Helvetica,sans-serif;">Enjoy.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/04/30/help-me-im-stuck-with-using-decades-old-technology-today-tales-of-16-bit-sql-server-client-connecting-to-a-named-instance-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The return of Modal dialogs in ActiveX controls hosted by Internet Explorer 8 ( IE8 )</title>
		<link>http://soft-haus.com/blog/2009/04/30/the-return-of-modal-dialogs-in-activex-controls-hosted-by-internet-explorer-8-ie8/</link>
		<comments>http://soft-haus.com/blog/2009/04/30/the-return-of-modal-dialogs-in-activex-controls-hosted-by-internet-explorer-8-ie8/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 15:49:03 +0000</pubDate>
		<dc:creator>Mark Vejvoda</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://soft-haus.com/blog/?p=285</guid>
		<description><![CDATA[When IE8 was released I was asked to do some evaluation of our somewhat large ActiveX application to see what issues to expect. The single largest issue was the fact that suddenly none of our modal dialogs were modal any longer! Now depending on your design, this new behaviour could be disastrous (and it would [...]]]></description>
			<content:encoded><![CDATA[<p>When IE8 was released I was asked to do some evaluation of our somewhat large ActiveX application to see what issues to expect. The single largest issue was the fact that suddenly none of our modal dialogs were modal any longer! Now depending on your design, this new behaviour could be disastrous (and it would have been for us). Fortunately there is a registry setting to make IE8 work as it does in IE7 and previous versions:</p>
<p>HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\</p>
<p>TabProcGrowth = 0</p>
<p>The value name can be a DWORD or a string (but my example assume a DWORD).</p>
<p>for more info on this setting and what it does check out search msdn.com for the word TabProcGrowth.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://soft-haus.com/blog/2009/04/30/the-return-of-modal-dialogs-in-activex-controls-hosted-by-internet-explorer-8-ie8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

