<?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>Dragly &#187; errors</title>
	<atom:link href="http://dragly.org/tag/errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://dragly.org</link>
	<description>It was about time I started writing my own tutorials to share some of the knowledge I&#039;ve picked up from around.</description>
	<lastBuildDate>Mon, 14 May 2012 22:32:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using the same script on installs with different EPD versions</title>
		<link>http://dragly.org/2012/05/15/using-the-same-script-on-installs-with-different-epd-versions/</link>
		<comments>http://dragly.org/2012/05/15/using-the-same-script-on-installs-with-different-epd-versions/#comments</comments>
		<pubDate>Mon, 14 May 2012 22:20:51 +0000</pubDate>
		<dc:creator>Svenn-Arne Dragly</dc:creator>
				<category><![CDATA[Mindseye]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[enthought]]></category>
		<category><![CDATA[enthought python distribution]]></category>
		<category><![CDATA[epd]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[import error]]></category>
		<category><![CDATA[importerror]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://dragly.org/?p=751</guid>
		<description><![CDATA[In the newest version of Enthought&#8217;s Python Distribution (EPD) on Ubuntu, the plotting package has been moved from enthought.mayavi.mlab to the shorter and more general mayavi.mlab. This does however mean that if you, like me, need to work with different &#8230; <a href="http://dragly.org/2012/05/15/using-the-same-script-on-installs-with-different-epd-versions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the newest version of Enthought&#8217;s Python Distribution (EPD) on Ubuntu, the plotting package has been moved from enthought.mayavi.mlab to the shorter and more general mayavi.mlab. This does however mean that if you, like me, need to work with different versions of EPD on multiple systems, will experience the following error from time to time:</p>
<pre>ImportError: No module named enthought.mayavi.mlab</pre>
<p>Now, to avoid switching the import statement every time you switch systems, you can make Python check if one of the versions is installed during import. If it is not, we&#8217;ll tell it to try the other. This is done in this simple command:</p>
<pre class="brush:py">try:
    from enthought.mayavi.mlab import *
except ImportError:
    from mayavi.mlab import *</pre>
<p>Just replace any other similar import statements the same way and your code should once again be working across all your installations.</p>
]]></content:encoded>
			<wfw:commentRss>http://dragly.org/2012/05/15/using-the-same-script-on-installs-with-different-epd-versions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing &#8220;undefined reference to `vtable for &#8230;&#8221;</title>
		<link>http://dragly.org/2010/01/03/fixing-undefined-reference-to-vtable-for/</link>
		<comments>http://dragly.org/2010/01/03/fixing-undefined-reference-to-vtable-for/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 23:00:23 +0000</pubDate>
		<dc:creator>Svenn-Arne Dragly</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[cplusplus]]></category>
		<category><![CDATA[errors]]></category>

		<guid isPermaLink="false">http://svenni.dragly.com/v7/?p=148</guid>
		<description><![CDATA[These annoying errors have been haunting me the last couple of days, so I figured I should share the most common reason for their occurrence. That is in my projects at least. This error is caused because the linker in &#8230; <a href="http://dragly.org/2010/01/03/fixing-undefined-reference-to-vtable-for/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These annoying errors have been haunting me the last couple of days, so I figured I should share the most common reason for their occurrence. That is in my projects at least.</p>
<p>This error is caused because the linker in gcc is unable to find the functions you have defined in your headers in your actual code. So if you have a header which looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #006E28;">#ifndef MESH_H</span>
<span style="color: #006E28;">#define MESH_H</span>
&nbsp;
<span style="color: #0057AE;">class</span> Mesh
<span style="color: #006E28;">&#123;</span>
<span style="color: #0057AE;">public</span><span style="color: #006E28;">:</span>
    Mesh<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    ~Mesh<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #0057AE;">virtual</span> <span style="color: #0057AE;">void</span> draw<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
<span style="color: #006E28;">&#125;</span><span style="color: #006E28;">;</span>
&nbsp;
<span style="color: #006E28;">#endif // MESH_H</span></pre></div></div>

<p>You must at least have these functions defined in your .cpp file:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #006E28;">#include &quot;mesh.h&quot;</span>
&nbsp;
Mesh<span style="color: #006E28;">::</span><span style="color: #2B74C7;">Mesh</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
<span style="color: #006E28;">&#125;</span>
&nbsp;
Mesh<span style="color: #006E28;">::</span><span style="color: #2B74C7;">~Mesh</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
<span style="color: #006E28;">&#125;</span>
&nbsp;
<span style="color: #0057AE;">void</span> Mesh<span style="color: #006E28;">::</span><span style="color: #2B74C7;">draw</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
<span style="color: #006E28;">&#125;</span></pre></div></div>

<p>After this, make sure you clean your compile environment to make sure no object files are being misinterpreted by the compiler. If you are using Qt or a project with a Makefile, you could just run these three commands (the first only applies to Qt projects).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">qmake
<span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dragly.org/2010/01/03/fixing-undefined-reference-to-vtable-for/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

