{"id":146,"date":"2012-12-18T12:27:12","date_gmt":"2012-12-18T18:27:12","guid":{"rendered":"http:\/\/cartometric.com\/blog\/?p=146"},"modified":"2014-09-25T13:31:39","modified_gmt":"2014-09-25T18:31:39","slug":"mapnik-rundemo-exe-error-run-from-within-the-democ-folder","status":"publish","type":"post","link":"https:\/\/elrobis.com\/blog\/2012\/12\/18\/mapnik-rundemo-exe-error-run-from-within-the-democ-folder\/","title":{"rendered":"mapnik rundemo.exe error: run from within the demo\/c++ folder?"},"content":{"rendered":"<p>So I just installed the <a href=\"http:\/\/mapnik.org\/news\/2011\/11\/29\/windows-binaries-progress\/\">mapnik 2.0.1 binaries for Windows<\/a>, and I ran into a &#8220;gotcha.&#8221; I couldn&#8217;t figure this out by Googling, so hopefully this post will help someone.\u00a0 (Be sure to note the embarrassing conclusion.)<\/p>\n<p>Specifically, following a fresh mapnik install, rundemo.exe told me this:<\/p>\n<blockquote><p><strong>C:\\mapnik-2.0.1rc0\\demo\\c++&gt;rundemo.exe<\/strong><br \/>\nusage: .\/rundemo &lt;mapnik_install_dir&gt;<br \/>\nUsually \/usr\/local\/lib\/mapnik<br \/>\nWarning: .\/rundemo looks for data in ..\/data\/,<br \/>\n<span style=\"text-decoration: underline;\">Therefore must be run from within the demo\/c++ folder<\/span>.<\/p><\/blockquote>\n<p>Note the first bit:\u00a0 usage: .\/rundemo <strong>&lt;mapnik_install_dir&gt;<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Well ok, that&#8217;s fine. Except this didn&#8217;t work, either:<\/p>\n<blockquote><p><strong>C:\\mapnik-2.0.1rc0\\demo\\c++&gt;rundemo C:\\mapnik-2.0.1rc0<\/strong><br \/>\nrunning demo &#8230;<br \/>\nlooking for &#8216;shape.input&#8217; plugin in&#8230; C:\\mapnik-2.0.1rc0\/input\/<br \/>\nlooking for DejaVuSans font in&#8230; C:\\mapnik-2.0.1rc0\/fonts\/DejaVuSans.ttf<br \/>\n### Configuration error: Could not create datasource. No plugin found for type &#8216;shape&#8217; (searched in: C:\\mapnik-2.0.1rc0\/input\/)<\/p><\/blockquote>\n<p>Hmm, but that is my install path??<\/p>\n<p>&nbsp;<\/p>\n<p>Anyway, I finally figured it out. This works:<\/p>\n<p>C:\\mapnik-2.0.1rc0\\demo\\c++&gt;<span style=\"color: #000000;\"><strong>rundemo C:\/mapnik-2.0.1rc0\/lib\/mapnik<\/strong><\/span><br \/>\nrunning demo &#8230;<br \/>\n[&#8230; yadda yadda &#8230;]<\/p>\n<p>&nbsp;<\/p>\n<p>Now for the embarrassing part&#8212;I was juxtaposing between <a href=\"http:\/\/wiki.openstreetmap.org\/wiki\/Mapnik\/Installation#For_Microsoft_Windows_.28Windows_2000_and_above.29\">this install tutorial<\/a> and <a href=\"http:\/\/mapnik.org\/news\/2011\/11\/29\/windows-binaries-progress\/\">this other install tutorial<\/a>, and clearly I did not pay close attention to the second. It turns out, if my eyes were peeled, I might have noticed this:<\/p>\n<blockquote><p><em>Then you should be able to run the demo program:<\/em><\/p>\n<pre><em>cd c:\\mapnik-2.0.1rc0\\demo\\c++ rundemo ..\\..\\lib\\mapnik<\/em><\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>I&#8217;d like to quote Donald Knuth and re-state: <a href=\"http:\/\/en.wikiquote.org\/wiki\/Donald_Knuth\"><em>&#8220;Software is hard&#8221;<\/em><\/a>, but this is just a good, old-fashioned case of I-was-dumb. Nevertheless, I was stumped and Googling didn&#8217;t help, so maybe this will save some the confusion. :\/<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p><em>&#8220;You know those guitars that are like ..double guitars?!?!&#8221;<\/em><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>So I just installed the mapnik 2.0.1 binaries for Windows, and I ran into a &#8220;gotcha.&#8221; I couldn&#8217;t figure this out by Googling, so hopefully this post will help someone.\u00a0 (Be sure to note the embarrassing conclusion.) Specifically, following a fresh mapnik install, rundemo.exe told me this: C:\\mapnik-2.0.1rc0\\demo\\c++&gt;rundemo.exe usage: .\/rundemo &lt;mapnik_install_dir&gt; Usually \/usr\/local\/lib\/mapnik Warning: .\/rundemo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[34],"tags":[22],"_links":{"self":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts\/146"}],"collection":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":3,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions\/261"}],"wp:attachment":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/categories?post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/tags?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}