Embedded Freaks..

September 28, 2010

Compiling Nutconf for Nut/OS-4.9.9 with wxWidget-2.8

Filed under: Uncategorized — kunilkuda @ 6:54 pm

It seems like the Nut/OS-4.9.9 nutconf has some compiling issue with wxWidget-2.8 (the default Ubuntu Lucid wxWidget). Here’s some patch to fix the ‘nutconf’ compilation

diff -Naur ethernut-4.9.9/nut/tools/nutconf/nutconfdoc.cpp ethernut-nutconf_bug-4.9.9/nut/tools/nutconf/nutconfdoc.cpp
--- ethernut-4.9.9/nut/tools/nutconf/nutconfdoc.cpp	2010-04-15 01:54:55.000000000 +0800
+++ ethernut-nutconf_bug-4.9.9/nut/tools/nutconf/nutconfdoc.cpp	2010-09-28 17:54:22.056471424 +0800
@@ -280,9 +280,11 @@
                     }
                 }
                 if (value) {
-					wxString escapedValue( value );
-					escapedValue.Replace(wxT("\""), wxT("\\\"")); // escape (") to (\");
-                    fprintf(fp, "%s = \"%s\"\n", opts->nco_name, escapedValue.c_str());
+                    wxString escapedValue = wxString::FromAscii( value );
+                    escapedValue.Replace(wxT("\""), wxT("\\\"")); // escape (") to (\");
+                    //fprintf(fp, "%s = \"%s\"\n", opts->nco_name, escapedValue.c_str());
+                    fprintf(fp, "%s = \"%s\"\n", opts->nco_name, (const char*) escapedValue.mb_str(wxConvUTF8));
+
                     free(value);
                 }
             }
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: