c++.wxwindows - wxHtmlWindow::OnLinkClicked() Definition Different ?
- graceindustries gmail.com (28/28) May 18 2005 I am using DMC43 and wxWindows 2.5.3, when I include the following
- Włodzimierz Skiba (7/13) May 18 2005 Here seems the problem.
- Bob Paddock (6/8) May 18 2005 I thought it would do The Right Thing because the header declarers the
I am using DMC43 and wxWindows 2.5.3, when I include the following in my .cpp file it will not compile, saying the diffinition is different than the header file, where it is defined as virtual. How do I fix this? Below is the complete error output. #include <wx/html/htmlwin.h> contains: // Called when user clicked on hypertext link. Default behavior is to // call LoadPage(loc) virtual void OnLinkClicked(const wxHtmlLinkInfo& link); My code has: #include <wx/html/htmlwin.h> void wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { wxString uri = link.GetHref(); wxLogVerbose( "{[%s/%u]:: wxHtmlWindow::OnLinkClicked} \"%s\"", __FILE__, __LINE__, uri.c_str() ); LoadPage( uri ); } C:\wx253\lib\dmc_lib\wxmsw25d_html.lib(htmlwin) Offset 0110DH Record Type 0091 Error 1: Previous Definition Different : ?OnLinkClicked wxHtmlWindow UAEXABVwxHtmlLinkInfo Z (void syscall wxHtmlWindow::OnLinkClicked(wxHtmlLinkInfo const &)) C:\DM\lib\shell32.lib(shguid) Warning 160: MS Precompiled TYPES not supported C:\DM\lib\shell32.lib(shguid) Warning 161: Unknown CV version, ignored --- errorlevel 1 Done.
May 18 2005
graceindustries gmail.com wrote in news:d6fd54$25ao$1 digitaldaemon.com:#include <wx/html/htmlwin.h> void wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)Here seems the problem. You seem to duplicate function which is already in library. You have to derive from wxHtmlWindow, not duplicate it.C:\DM\lib\shell32.lib(shguid) Warning 160: MS Precompiled TYPES not supported C:\DM\lib\shell32.lib(shguid) Warning 161: Unknown CV version, ignoredThese warnings are unrelated to wxWidgets. I already reported it here. Have no idea what's the reason an have no idea what's is the status of fixing it in DMC. ABX
May 18 2005
On Wed, 18 May 2005 12:53:35 +0000 (UTC), Włodzimierz Skiba <abx abx.art.pl> wrote:I thought it would do The Right Thing because the header declarers the function as virtual? BCC did not complain about it, which is where I'm porting the code from.#include <wx/html/htmlwin.h> void wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
May 18 2005