Re: pgAgent 2.0.0 compilation errors (types casting)
От | Dave Page |
---|---|
Тема | Re: pgAgent 2.0.0 compilation errors (types casting) |
Дата | |
Msg-id | 937d27e10811250335h653268bdt8a7740821eaeb94b@mail.gmail.com обсуждение исходный текст |
Ответ на | pgAgent 2.0.0 compilation errors (types casting) ("Tomasz Zeman" <tomasz.zeman@gmail.com>) |
Ответы |
Re: pgAgent 2.0.0 compilation errors (types
casting)
|
Список | pgadmin-hackers |
Hi Tomasz On Tue, Nov 25, 2008 at 11:02 AM, Tomasz Zeman <tomasz.zeman@gmail.com> wrote: > Hi Dave, > > > I have adjusted cmake to use the mswu and wxWidgets are compiled to use > Unicode. > Unfortunately, the compilation error still appears. > > Between other errors, I am having the following compilation ones: > win32.cpp > ..\win32.cpp(59) : error C2660: 'wxString::wc_str' : function does not take > 0 arguments > ..\win32.cpp(123) : error C2664: '_wcsdup' : cannot convert parameter 1 from > 'const TCHAR *' to 'const wchar_t *' > Types pointed to are unrelated; conversion requires > reinterpret_cast, C-style cast or function-style cast > ..\win32.cpp(520) : error C2660: 'wxString::wc_str' : function does not take > 0 arguments > ..\win32.cpp(520) : error C2466: cannot allocate an array of constant size 0 > > > Extract from D:\C++\pgAgent-2.0.0-Source\win32.cpp (52) The compilation > fails on the last line. > void LogMessage(wxString msg, int level) > { > if (eventHandle) > { > LPCTSTR *tmp; > > tmp = (LPCTSTR *)malloc(sizeof(LPCTSTR)); > tmp[0] = _wcsdup(msg.wc_str()); > > > The compiler says the wc_str expects some arguments. That code has been like that for over 2 and a half years now, and has been compiled countless times. > I have inspected the wxWidget::wxString class, and there is no function > ::wc_str without parameters. No, but there is in include/wx/string.h (defined for Unicode builds): const wxChar* wc_str() const { return c_str(); } > I cannot understand how it is possible to compile this. Dave, what version > of wx are you using? I tested on 2.8.8 and then upgraded to 2.8.9 in case it was a version specific issue. Does it compile if you change the call to c_str() ? -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
В списке pgadmin-hackers по дате отправления: