[En-Nut-Discussion] error compiling nutconf in Kubuntu: conversion from `const char[6]' to `const wxString' is ambiguous
Jose Vallet
jose.vallet at hut.fi
Wed Nov 29 20:44:21 CET 2006
Hello.
I am trying to install NutOS in Kubuntu following the instructions from
http://www.ethernut.de/en/documents/debiansage.html
Well, not exactly those ones, because there are already some packages
available for ubuntu. Anyway, I had a problem.
The versions that I use (all of them installed with synaptic).
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
autoconf (GNU Autoconf) 2.59
automake (GNU automake) 1.9.6
libgtk2.0-dev
libwxgtk2.6dev
Lua 5.0.3
doxygen 1.4.6
graphviz 2.2.1-1
When I download ethernut 4.2.1 and do configure and make I get the
following error (sorry for the Spanish...)
****************************************
if g++ -DHAVE_CONFIG_H -I. -I. -I../..
-I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -g -O2 -MT nutconf-settings.o
-MD -MP -MF ".deps/nutconf-settings.Tpo" -c -o nutconf-settings.o `test
-f 'settings.cpp' || echo './'`settings.cpp; \
then mv -f ".deps/nutconf-settings.Tpo"
".deps/nutconf-settings.Po"; else rm -f ".deps/nutconf-settings.Tpo";
exit 1; fi
settings.cpp: In constructor ‘CSettings::CSettings()’:
settings.cpp:147: error: la conversión de ‘const char [6]’ a ‘const
wxString’ es ambigua
/usr/include/wx-2.6/wx/string.h:642: nota: los candidatos son:
wxString::wxString(wxChar, size_t) <coincidencia cercana>
/usr/include/wx-2.6/wx/string.h:632: nota:
wxString::wxString(int) <coincidencia cercana>
settings.cpp:151: error: la conversión de ‘const char [6]’ a ‘const
wxString’ es ambigua
/usr/include/wx-2.6/wx/string.h:642: nota: los candidatos son:
wxString::wxString(wxChar, size_t) <coincidencia cercana>
/usr/include/wx-2.6/wx/string.h:632: nota:
wxString::wxString(int) <coincidencia cercana>
settings.cpp:158: error: la conversión de ‘const char [6]’ a ‘const
wxString’ es ambigua
/usr/include/wx-2.6/wx/string.h:642: nota: los candidatos son:
wxString::wxString(wxChar, size_t) <coincidencia cercana>
/usr/include/wx-2.6/wx/string.h:632: nota:
wxString::wxString(int) <coincidencia cercana>
make[2]: *** [nutconf-settings.o] Error 1
make[2]: se sale del directorio `/home/jose/ethernut-4.2.1/tools/nutconf'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/home/jose/ethernut-4.2.1'
make: *** [all] Error 2
************************************************
then I open tools/nutconf/settings.cpp and find the problematic lines
Line 147
fn.AppendDir("tools");
Line 151
fn.AppendDir("linux");
Line 158
if (!m_source_dir_default.Contains("/nut/")) {
I change them respectively to (I got the hint from
http://www.wxwidgets.org/wiki/index.php/WxString)
fn.AppendDir(wxT("tools"));
fn.AppendDir(wxT("linux"));
if (!m_source_dir_default.Contains(wxT("/nut/"))) {
and then the compilation process finishes OK, and after some playing
with the configurator I am able to compile the libraries, create the
sample directory and compile the examples.
If the solution provided is OK, it might be so that line 49
fn.AppendDir("win32");
could be changed in a similar way
Regards.
José
More information about the En-Nut-Discussion
mailing list