[chuck-users] [chuck] miniAudicle-0.1.3.3 release (mac + linux + win)

Cedric Krier ced at ced.homedns.org
Thu Jul 27 10:02:58 EDT 2006


Here is a patch that fix the unicode compile issue. But it seems that
there is still a problem because when I run miniAudicle, I have a
segfault.

Cédric

On 27/07/06 15:27 +0200, Cedric Krier wrote:
> 
> I have the same error. The wxWidgets is build with the unicode support
> and it seems that there is some conversion are missing.
> 
> 
> Cédric
> 
> On 27/07/06 09:15 -0400, Ge Wang wrote:
> > redirected from [chuck], from mik
> > 
> > ---
> > Hi
> > 
> > I quite quickly get an error when compiling the linux version:
> > 
> > mik at klimop:~/src/miniAudicle-0.1.3.3$ make linux-alsa
> > make -f makefile.alsa
> > make[1]: Entering directory `/home/mik/src/miniAudicle-0.1.3.3'
> > gcc -D__LINUX_ALSA__ -D__LINUX__ -D__MA_WXWIDGETS__ `wx-config=20
> > --cppflags` -O3 -c -D__CK_SNDFILE_NATIVE__ -Ichuck/src -Iwxw=20
> > -I/home/mik/src/miniAudicle-0.1.3.3 miniAudicle.cpp
> > gcc -o wxw/mAParentFrame.o -D__LINUX_ALSA__ -D__LINUX__=20
> > -D__MA_WXWIDGETS__ `wx-config --cppflags` -O3 -c 
> > -D__CK_SNDFILE_NATIVE__=20
> > -Ichuck/src -Iwxw -I/home/mik/src/miniAudicle-0.1.3.3 
> > wxw/mAParentFrame.c=
> > pp
> > wxw/mAParentFrame.cpp: In constructor=20
> > 'mAParentFrame::mAParentFrame(miniAudicle*, wxDocManager*, wxFrame*,=20
> > const wxString&, const wxPoint&, const wxSize&, long int)':
> > wxw/mAParentFrame.cpp:369: error: no matching function for call to=20
> > 'wxString::Printf(const char [], const char [], const char [])'
> > /usr/include/wx-2.6/wx/string.h:1080: note: candidates are: int=20
> > wxString::Printf(const wxChar*, ...)
> > make[1]: *** [wxw/mAParentFrame.o] Error 1
> > make[1]: Leaving directory `/home/mik/src/miniAudicle-0.1.3.3'
> > make: [linux-alsa] Error 2 (ignored)
> > 
> > ?
> > 
> > Thanks
> > 
> > mik
> > 
> > Spencer Salazar schreef:

-------------- next part --------------
diff -ru miniAudicle-0.1.3.3~/wxw/mAConsoleMonitor.cpp miniAudicle-0.1.3.3/wxw/mAConsoleMonitor.cpp
--- miniAudicle-0.1.3.3~/wxw/mAConsoleMonitor.cpp	2006-07-26 21:52:18.000000000 +0200
+++ miniAudicle-0.1.3.3/wxw/mAConsoleMonitor.cpp	2006-07-27 15:53:20.000000000 +0200
@@ -203,14 +203,14 @@
 			{
 				len = read( console_monitor->err_fd, buf, BUF_SIZE-1 );
 				buf[len] = 0;
-				console_monitor->text->AppendText( _T( buf ) );
+				console_monitor->text->AppendText( wxString(buf, wxConvUTF8) );
 			}
 
 			if( pfd[1].revents & POLLIN )
 			{
 				len = read( console_monitor->out_fd, buf, BUF_SIZE-1 );
 				buf[len] = 0;
-				console_monitor->text->AppendText( _T( buf ) );
+				console_monitor->text->AppendText( wxString(buf, wxConvUTF8) );
 			}
 		}
 	}
@@ -223,7 +223,7 @@
 		//fflush( NULL );
 
 		if( fgets( buf, BUF_SIZE, f ) )
-			console_monitor->text->AppendText( _T( buf ) );
+			console_monitor->text->AppendText( wxString(buf, wxConvUTF8) );
 	}
 
 #endif /* __PLATFORM_WIN32__ */
diff -ru miniAudicle-0.1.3.3~/wxw/mAParentFrame.cpp miniAudicle-0.1.3.3/wxw/mAParentFrame.cpp
--- miniAudicle-0.1.3.3~/wxw/mAParentFrame.cpp	2006-07-26 21:52:18.000000000 +0200
+++ miniAudicle-0.1.3.3/wxw/mAParentFrame.cpp	2006-07-27 15:49:39.000000000 +0200
@@ -366,7 +366,7 @@
 	sizer->Add( logo, 0, wxALL | wxALIGN_CENTER, 10 );
 
 	wxString copystring;
-	copystring.Printf( MA_ABOUT, MA_VERSION, CK_VERSION );
+	copystring.Printf( wxString(MA_ABOUT, wxConvUTF8), MA_VERSION, CK_VERSION );
 	copystring.Prepend( _T( "miniAudicle\n" ) );
 	wxStaticText * copytext = new wxStaticText( &about_dialog, wxID_ANY, 
 		copystring, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
diff -ru miniAudicle-0.1.3.3~/wxw/mAView.cpp miniAudicle-0.1.3.3/wxw/mAView.cpp
--- miniAudicle-0.1.3.3~/wxw/mAView.cpp	2006-07-26 21:52:18.000000000 +0200
+++ miniAudicle-0.1.3.3/wxw/mAView.cpp	2006-07-27 15:51:55.000000000 +0200
@@ -179,7 +179,7 @@
 
 	ma->run_code( code, name, cid, cgid, result );
 	
-	wxString status( _T( result.c_str() ) );
+	wxString status(result.c_str(), wxConvUTF8);
 	
 	frame->SetStatusText( status );
 }
@@ -191,7 +191,7 @@
 
 	ma->remove_code( cid, cgid, result );
 	
-	wxString status( _T( result.c_str() ) );
+	wxString status(result.c_str(), wxConvUTF8);
 	
 	frame->SetStatusText( status );
 }
@@ -203,7 +203,7 @@
 
 	ma->replace_code( code, cid, cgid, result );
 
-	wxString status( _T( result.c_str() ) );
+	wxString status( result.c_str(), wxConvUTF8);
 	
 	frame->SetStatusText( status );
 }
diff -ru miniAudicle-0.1.3.3~/wxw/mAVMMonitor.cpp miniAudicle-0.1.3.3/wxw/mAVMMonitor.cpp
--- miniAudicle-0.1.3.3~/wxw/mAVMMonitor.cpp	2006-07-26 21:52:18.000000000 +0200
+++ miniAudicle-0.1.3.3/wxw/mAVMMonitor.cpp	2006-07-27 15:37:41.000000000 +0200
@@ -83,7 +83,7 @@
 		wxSize( 250, 300 ), wxSUNKEN_BORDER );
 	sizer->Add( grid, 2, wxALL | wxALIGN_CENTER | wxEXPAND, 10 );
 
-	vm_start = new wxButton( this, mAID_TOGGLE_VM, "Start Virtual Machine" );
+	vm_start = new wxButton( this, mAID_TOGGLE_VM, _T( "Start Virtual Machine" ) );
 	sizer->Add( vm_start, 0, wxBOTTOM | wxALIGN_CENTER, 10 );
 
 	grid->CreateGrid( 0, 4 );
@@ -220,27 +220,27 @@
 	now = ( time_t ) ( status.now_system / status.srate );
 	if( now != last_now )
 	{
-		time_counter->SetLabel( wxString::Format( "running time: %u:%02u",
+		time_counter->SetLabel( wxString::Format( _T( "running time: %u:%02u" ),
 												  now / 60, now % 60 ) );
 		last_now = now;
 	}
 
 	if( num_shreds != last_num_shreds )
 	{
-		shred_count->SetLabel( wxString::Format( "shreds: %u", num_shreds ) );
+		shred_count->SetLabel( wxString::Format( _T( "shreds: %u" ), num_shreds ) );
 		last_num_shreds = num_shreds;
 	}
 
 	for( int i = 0; i < num_shreds; i++ )
 	{
-		temp = wxString::Format( "%u", status.list[i]->xid );
+		temp = wxString::Format( _T( "%u" ), status.list[i]->xid );
 		grid->SetCellValue( i, 0, temp );
 
-		temp = wxString::Format( "%s", status.list[i]->name.c_str() );
+		temp = wxString::Format( _T( "%s" ), status.list[i]->name.c_str() );
 		grid->SetCellValue( i, 1, temp );
 
 		age = ( time_t ) ( ( status.now_system - status.list[i]->start ) / status.srate );
-		temp = wxString::Format( "%u:%02u", age / 60, age % 60 );
+		temp = wxString::Format( _T( "%u:%02u" ), age / 60, age % 60 );
 		grid->SetCellValue( i, 2, temp );
 
 		grid->SetCellValue( i, 3, _T( "-" ) );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20060727/ac29768a/attachment-0001.bin 


More information about the chuck-users mailing list