hello :) i use Mac OS X 10.4.5 , and ruby 1.8.4 , wxWidgets 2.4.2 ( from cvs ). i tried to compile wxRuby, but there are always errors around "id" , dialog.cpp: In static member function ''static VALUEWxDialog::init(int,VALUE*, VALUE)'':dialog.cpp:60: error: expected unqualified-id before''='' tokenmake: *** [dialog.o] Error 1 like above. in that case, in function "init", i have changed all "id(wxWindowIDid= -1;)" in init function to "_id", that errors are resolved. does anybody know about that?
On Thu, 2006-03-09 at 19:20 +0900, Park,Jin Hyung wrote:> hello :) > i use Mac OS X 10.4.5 , and ruby 1.8.4 , wxWidgets 2.4.2 ( from cvs ). > i tried to compile wxRuby, but there are always errors around "id" , > dialog.cpp: In static member function ''static VALUEWxDialog::init(int,VALUE*, VALUE)'':dialog.cpp:60: error: expected unqualified-id before''='' tokenmake: *** [dialog.o] Error 1 > like above. > in that case, in function "init", i have changed all "id(wxWindowIDid= -1;)" in init function to "_id", that errors are resolved. > does anybody know about that?I have not heard of that error before. Perhaps one of our Mac developers can help. Hopefully we will be doing a "preview release" of wxruby2 shortly. If you can use it, that might be the easiest solution. Thanks, Kevin
Kevin Smith wrote:> On Thu, 2006-03-09 at 19:20 +0900, Park,Jin Hyung wrote: >> hello :) >> i use Mac OS X 10.4.5 , and ruby 1.8.4 , wxWidgets 2.4.2 ( from cvs ). >> i tried to compile wxRuby, but there are always errors around "id" , >> dialog.cpp: In static member function ''static VALUEWxDialog::init(int,VALUE*, VALUE)'':dialog.cpp:60: error: expected unqualified-id before''='' tokenmake: *** [dialog.o] Error 1 >> like above. >> in that case, in function "init", i have changed all "id(wxWindowIDid= -1;)" in init function to "_id", that errors are resolved. >> does anybody know about that? > > I have not heard of that error before. Perhaps one of our Mac developers > can help.Hi, This error has something to do with "id" being a keyword (or type or something) in Objective-C. And I think wxMac is based on Cocoa, which is a Objective-C library. So the whole thing gets compiled with Objective-C enabled and the compiler thinks that "id" is a type, not a name and gets confused. The solution is to rename all the "id" variables to something else. Regards, Robin
On Thu, 2006-03-09 at 20:54 +0100, Robin Stocker wrote:> This error has something to do with "id" being a keyword (or type or > something) in Objective-C. And I think wxMac is based on Cocoa, which is > a Objective-C library. So the whole thing gets compiled with Objective-C > enabled and the compiler thinks that "id" is a type, not a name and gets > confused. The solution is to rename all the "id" variables to something > else.Yikes. Ok. Does it depend on which compiler you use? Or are there compiler settings to avoid the problem? I''m surprised that none of our Mac developers have hit or mentioned this before. Assuming it''s a real problem, can anyone confirm whether or not it is also a problem with wxruby2? I''m not likely to make any more changes to the wxruby1 code base, but if it''s a problem with wxruby2 we should fix it. Thanks! Kevin
I have never run in to this problem with wxRuby2, I never had much luck with the old wxRuby on Mac OS X, that is one of the reasons I started working on wxRuby2. Sean On 3/9/06, Kevin Smith <wxruby at qualitycode.com> wrote:> On Thu, 2006-03-09 at 20:54 +0100, Robin Stocker wrote: > > This error has something to do with "id" being a keyword (or type or > > something) in Objective-C. And I think wxMac is based on Cocoa, which is > > a Objective-C library. So the whole thing gets compiled with Objective-C > > enabled and the compiler thinks that "id" is a type, not a name and gets > > confused. The solution is to rename all the "id" variables to something > > else. > > Yikes. Ok. Does it depend on which compiler you use? Or are there > compiler settings to avoid the problem? I''m surprised that none of our > Mac developers have hit or mentioned this before. > > Assuming it''s a real problem, can anyone confirm whether or not it is > also a problem with wxruby2? I''m not likely to make any more changes to > the wxruby1 code base, but if it''s a problem with wxruby2 we should fix > it. > > Thanks! > > Kevin > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >