[Wxruby-users] Windows Compile Error
Wayne Vucenic
wvucenic at netgate.net
Sun Oct 26 16:30:27 EST 2003
Hi Kevin,
You and I met a few times at the now dormant Bay Area Ruby User's
meetings. I'm glad to see the progress you're making on wxRuby.
You're right about this error being caused by the file
"..Microsoft Visual Studio/VC98/INCLUDE/winuser.h" doing
#define GetClassName GetClassNameW
OR
#define GetClassName GetClassNameA
I'm a bit too snowed under to take a careful look at this right now (for
example, I'm at work today (Sunday)), but I did just now grab the
wxruby 0.1.0 .tgz file from your web site and tried to compile
app.cpp.
I did get the error
...\app.cpp(176) : error C2039: 'GetClassNameA' : is not a member of 'wxAppWithCallbacks'
...\app_cb.h(16) : see declaration of 'wxAppWithCallbacks'
(I also got a few other errors, so apparently there is newer source in
CVS.)
Your suggestion to include the line
#undef GetClassName
caused the above error to go away, but I did have to put this line at the top
of app.h (rather than in app.cpp), since "GetClassName" also appears
in app.h.
Hope this helps,
Wayne
No Bugs Software
"Ruby and C++ Contract Programming in Silicon Valley"
Sunday, October 26, 2003, 2:13:11 PM, you wrote:
KS> Curt Hibbs wrote:
>>>>Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
>>>>app.cpp
>>>>app.cpp(181) : error C2039: 'GetClassNameA' : is not a member of
>> Its actually complaining that GetClassName does not exist as a member of the
>> class wxAppWithCallbacks. It should exist, of course, because it is derived
>> from wxApp which is (in turn) derived from wxAppBase, and GetClassName is
>> defined in wxAppBase.
>>
>> It possibly has something to do with the name mangling it is doing to add
>> the "A" suffix, but if so the compiler should do the same mangling when
>> processing the wxApp.h header file.
KS> I really, really, really think this has to do with a header defining
KS> GetClassName to be GetClassNameA. If I remember correctly, that's the
KS> way MS was able to have both Ascii (Win 95) and Unicode (Win NT) support
KS> in the same code base.
KS> It seems that wxApp *does* have GetClassName, but for some reason in
KS> app.cpp it is looking for GetClassNameA instead. You could try inserting
KS> the #undef GetClassName on line 180 of app.cpp to see if that changes
KS> the behavior.
KS> Kevin
KS> _______________________________________________
KS> wxruby-users mailing list
KS> wxruby-users at rubyforge.org
KS> http://rubyforge.org/mailman/listinfo/wxruby-users
More information about the wxruby-users
mailing list