From: | "Dave Page" <dpage(at)pgadmin(dot)org> |
---|---|
To: | "Tomasz Zeman" <tomasz(dot)zeman(at)gmail(dot)com> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: pgAgent 2.0.0 compilation errors (types casting) |
Date: | 2008-11-25 11:35:44 |
Message-ID: | 937d27e10811250335h653268bdt8a7740821eaeb94b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi Tomasz
On Tue, Nov 25, 2008 at 11:02 AM, Tomasz Zeman <tomasz(dot)zeman(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2008-11-25 12:49:23 | Re: new patch for index DESC/NULLS FIRST/NULLS LAST |
Previous Message | svn | 2008-11-25 10:56:16 | SVN Commit by dpage: r7505 - trunk/pgadmin3/pgadmin/dlg |