I was going to build an autopackage this morning for those who would like to play with the new keymaps but the build errored out with the following message. I'm assuming that it is caused by Binreloc because that is something that is different in the autopackage build. I understand some of the words but it is still a little beyond me. mental?
Aaron Spike
io/resource.cpp: In function ‘Inkscape::Util::ptr_shared<char> Inkscape::IO::Resource::get_path(Inkscape::IO::Resource::Domain, Inkscape::IO::Resource::Type, const char*)’: io/resource.cpp:38: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:39: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:40: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:41: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:42: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:43: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:44: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:45: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:46: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:47: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:48: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:49: error: invalid conversion from ‘const char*’ to ‘gchar*’ io/resource.cpp:50: error: invalid conversion from ‘const char*’ to ‘gchar*’
Aaron Spike wrote:
I was going to build an autopackage this morning for those who would like to play with the new keymaps but the build errored out with the following message. I'm assuming that it is caused by Binreloc because that is something that is different in the autopackage build. I understand some of the words but it is still a little beyond me. mental?
Jon Cruz suggested the attached diff. It seems to have gotten me past the compile error (autopackage is still building right now).
Aaron Spike
Index: src/io/resource.cpp =================================================================== --- src/io/resource.cpp (revision 11242) +++ src/io/resource.cpp (working copy) @@ -34,23 +34,24 @@ gchar *path=NULL; switch (domain) { case SYSTEM: { + gchar const* temp = 0; switch (type) { - case APPICONS: path = INKSCAPE_APPICONDIR; break; - case EXTENSIONS: path = INKSCAPE_EXTENSIONDIR; break; - case GRADIENTS: path = INKSCAPE_GRADIENTSDIR; break; - case ICONS: path = INKSCAPE_PIXMAPDIR; break; - case KEYS: path = INKSCAPE_KEYSDIR; break; - case MARKERS: path = INKSCAPE_MARKERSDIR; break; - case PALETTES: path = INKSCAPE_PALETTESDIR; break; - case PATTERNS: path = INKSCAPE_PATTERNSDIR; break; - case PLUGINS: path = INKSCAPE_PLUGINDIR; break; - case SCREENS: path = INKSCAPE_SCREENSDIR; break; - case TEMPLATES: path = INKSCAPE_TEMPLATESDIR; break; - case TUTORIALS: path = INKSCAPE_TUTORIALSDIR; break; - case UI: path = INKSCAPE_UIDIR; break; + case APPICONS: temp = INKSCAPE_APPICONDIR; break; + case EXTENSIONS: temp = INKSCAPE_EXTENSIONDIR; break; + case GRADIENTS: temp = INKSCAPE_GRADIENTSDIR; break; + case ICONS: temp = INKSCAPE_PIXMAPDIR; break; + case KEYS: temp = INKSCAPE_KEYSDIR; break; + case MARKERS: temp = INKSCAPE_MARKERSDIR; break; + case PALETTES: temp = INKSCAPE_PALETTESDIR; break; + case PATTERNS: temp = INKSCAPE_PATTERNSDIR; break; + case PLUGINS: temp = INKSCAPE_PLUGINDIR; break; + case SCREENS: temp = INKSCAPE_SCREENSDIR; break; + case TEMPLATES: temp = INKSCAPE_TEMPLATESDIR; break; + case TUTORIALS: temp = INKSCAPE_TUTORIALSDIR; break; + case UI: temp = INKSCAPE_UIDIR; break; default: g_assert_not_reached(); } - path = g_strdup(path); + path = g_strdup(temp); } break; case USER: { char const *name=NULL;
On Thu, 06 Apr 2006 10:41:20 -0500, Aaron Spike <aaron@...749...> wrote:
Jon Cruz suggested the attached diff. It seems to have gotten me past the compile error (autopackage is still building right now).
Yes, that's the right solution.
The error is a good example of why it's never a good idea to reuse variables like I did here.
-mental
participants (2)
-
Aaron Spike
-
MenTaLguY