[En-Nut-Discussion] [Mini patch] Cast strings in settings.cpp

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sun Oct 22 16:46:10 CEST 2006


Hello,

on Suse10.1, ethernut compilation aborts with:
settings.cpp:151: error: conversion from $,1rx(Bconst char [6]$,1ry(B to $,1rx(Bconst
wxString$,1ry(B is ambiguous
/usr/include/wx-2.6/wx/string.h:643: note: candidates are:
wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.6/wx/string.h:633: note:
wxString::wxString(int) <near match>
settings.cpp:158: error: conversion from $,1rx(Bconst char [6]$,1ry(B to $,1rx(Bconst
wxString$,1ry(B is ambiguous

Casting the strings helped/
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--- ethernut-4.2.1/tools/nutconf/settings.cpp~	2006-10-05 19:04:46.000000000 +0200
+++ ethernut-4.2.1/tools/nutconf/settings.cpp	2006-10-22 16:43:10.000000000 +0200
@@ -144,18 +144,18 @@
     
     /* Get absolute tools path. */
     wxFileName fn(m_relsrcpath + wxT("/dummy"));
-    fn.AppendDir("tools");
+    fn.AppendDir(wxT("tools"));
 #ifdef _WIN32
-    fn.AppendDir("win32");
+    fn.AppendDir(wxT("win32"));
 #else
-    fn.AppendDir("linux");
+    fn.AppendDir(wxT("linux"));
 #endif
     fn.MakeAbsolute();
     wxString toolPath = fn.GetPath();
 
     /* Get source path component. */
     m_source_dir_default = fn.GetFullPath(wxPATH_UNIX);
-    if (!m_source_dir_default.Contains("/nut/")) {
+    if (!m_source_dir_default.Contains(wxT("/nut/"))) {
         m_source_dir_default = m_source_dir_default.BeforeLast('/');
         m_source_dir_default = m_source_dir_default.BeforeLast('/');
         m_source_dir_default = m_source_dir_default.BeforeLast('/');



More information about the En-Nut-Discussion mailing list