[SOLVED] log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ‘n’

EDIT: SOLVED , vedere commento ๐Ÿ˜€

log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ‘n’

GDC.rb

--- GDC.rb	Thu Jan 28 17:03:12 2010

+++ GDC.rb.new	Thu Jan 28 16:50:37 2010

@@ -13,10 +13,10 @@

     private_class_method :new

 

     def self.check_thread_instance()

-      if ( Thread.main != Thread.current ):

+      if ( Thread.main != Thread.current )

 	raise "Can only initialize Global Diagnostic Context from Thread.main" 

       else

-	if ( Thread.main[GDCNAME] == nil ):

+	if ( Thread.main[GDCNAME] == nil )

 	  Thread.main[GDCNAME] = $0

 	end

       end

line 19
repalce
if ( Thread.main[GDCNAME] == nil ):
with
if ( Thread.main[GDCNAME] == nil )

NDC.rb

--- NDC.rb	Thu Jan 28 17:03:09 2010

+++ NDC.rb.new	Thu Jan 28 16:51:35 2010

@@ -15,7 +15,7 @@

     private_class_method :new

 

     def self.check_thread_instance()

-      if ( Thread.current[NDCNAME] == nil ):

+      if ( Thread.current[NDCNAME] == nil )

 	Thread.current[NDCNAME] = Array.new

 	Thread.current[NDCNAMEMAXDEPTH] = NDCDEFAULTMAXDEPTH

       end

@@ -65,7 +65,7 @@

 

     def self.push( value )

       self.check_thread_instance()

-      if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] ):		

+      if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] )

 	Thread.current[NDCNAME].push( value )

       end

     end

[SOLVED] ruby 1.9.1 mingw32 wxruby => undefined reference to ‘wxGraphicsRenderer::CreateBitmap’

Hi to all,
i’ve compiled wxWidgets with this options:

./configure --enable-optimise --enable-stl --enable-unicode
--disable-threads --enable-static  --with-opengl --disable-shared
--enable-monolithic --disable-debug --with-libjpeg=builtin
--with-libpng=builtin  --with-zlib=builtin --enable-graphics_ctx
--enable-mediactrl --enable-unicode --with-libtiff=builtin
--with-expat=builtin --enable-gui -enable-xrc --enable-mdi --enable-gif
--enable-pcx --enable-iff --enable-png --enable-xpm

and also compiled StyledTextCtrl .

My system is :
Windows xp sp3
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]
gcc.exe 3.4.5
swig.exe 1.3.38
rake 0.8.7

when compiled wxruby (from svn), i’ve recived this error:

c:msysMinGWbin..libgccmingw323.4.5........mingw32binld.exe:
warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
C:msys1.0srcwxWidgets-2.8.10/lib/libwx_mswu-2.8.a(monolib_graphcmn.o):graphcmn.cpp:(.text+0x3374):
undefined reference to `wxGraphicsRenderer::CreateBitmap(wxBitmapconst&)'
collect2: ld returned 1 exit status
rake aborted!
Command failed with status (1): [g++ -shared -L.obj/AboutDialogInfo.o o...]

[SOLVED]

IF i compile wxWidgests 2.8.10 i’ve this error:

C:msys1.0srcwxWidgets-2.8.10/lib/libwx_mswu-2.8.a(monolib_graphcmn.o):graphcmn.cpp:(.text+0x3374): 
undefined reference to `wxGraphicsRenderer::CreateBitmap(wxBitmap 
const&)'

If i compile with wxWidgets 2.8.9 WORK !!!

this is the gem :
svn version: 2107
http://www.waydotnet.com/ruby/wxruby-ruby19-2.0.1.svn-x86-mingw32.gem

Only problem when install without –no-rdoc

๐Ÿ˜€

reference:
http://www.ruby-forum.com/topic/202491

64bit:

./configure --enable-optimise --enable-stl --enable-unicode --enable-threads --enable-static  --with-opengl --disable-shared --enable-monolithic --disable-debug --with-libjpeg=builtin --with-libpng=builtin  --with-zlib=builtin --enable-graphics_ctx --enable-mediactrl --enable-unicode --with-libtiff=builtin --with-expat=builtin --enable-gui -enable-xrc --enable-mdi --enable-gif --enable-pcx --enable-iff --enable-png --enable-xpm --with-odbc=sys CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-fPIC