Menu

#86 problems compiling wxTreeListCtrl with GCC 4.x

closed-works-for-me
7
2009-10-05
2009-09-14
No

[opened on behalf of Max Jonathan Spaulding]

Hello Ronan,

I am not sure if you check the wxCode users list.

I had some problems compiling the latest wxTreeListCtrl with GCC 4.4.0 and a
mingw cross compiler also 4.4.0 on Fedora Linux 11.

I sent this to the wxCode mailing list. The patches fix most everything.

-Max

---------- Forwarded Message ----------

I have to patches that fix most of my problems

I still get a bunch of warnings from bitmaps/file.xpm

bitmaps/file.xpm:38: warning: deprecated conversion from string constant to
‘char*’

and for some reason on Fedora 11 gcc 4.4.0 the makefile in samples/treelisttest
thinks it should run windres.

make
windres `wx-config --cppflags -rescomp` -i treelisttest.rc -J rc -o
treelisttest.res -O coff
/bin/sh: windres: command not found
make: *** [treelisttest.res] Error 127

Don't think I am going to bother looking at either of them as all I need is
the treelistctrl.cpp to compile and link and I think the patch takes care of
that. Added some typecasts that were missing and through _T() around some
bare quotes.

-Max

On Sunday 16 August 2009 19:02:20 Max Jonathan Spaulding wrote:
> Just checking to see if anyone has compiled the newest release of this?
>
> Trying to get the 07/09/2009 version fo this to build from here
> http://wxcode.sourceforge.net/components/treelistctrl/
>
> I thought from reading the forum that it was stable and would just build.
> But I can't get it to compile with GCC or Mingw
>
> gcc version for linux
> gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)
>
> gcc version for mingw cross compiler
> gcc version 4.4.0 20090319 (experimental) (GCC)
>
> Both give me the same errors. Missing <wx/app.h> Passing of
> wxTreeListItem*'s all over where wxTreeItemId&'s are expected etc...
>
> So my question is am I insane and just missing something to make this work,
> or is the latest stable not so stable?
>
> wxWidgets versions
>
> wx-config --list
>
> Default config is gtk2-unicode-release-2.8
>
>
> /usr/i686-pc-mingw32/sys-root/mingw/bin/wx-config --list
>
> Default config is i686-pc-mingw32-msw-unicode-debug-2.8
>
> Default config will be used for output
>
> Alternate matches:
> i686-pc-mingw32-msw-unicode-release-2.8
>
> Output from make in treelisttest
> make
> g++ -c -I../../include `wx-config --cxxflags` -g -o treelistctrl.o
> ../../src/treelistctrl.cpp
> ../../src/treelistctrl.cpp: In member function ‘virtual bool
> wxEditTextCtrl::Destroy()’:
> ../../src/treelistctrl.cpp:1020: error: ‘wxTheApp’ was not declared in this
> scope
> ../../src/treelistctrl.cpp: In member function ‘void
> wxTreeListMainWindow::DoDeleteItem(wxTreeListItem*)’:
> ../../src/treelistctrl.cpp:2509: error: conversion from ‘int’ to ‘const
> wxTreeItemId’ is ambiguous
> /usr/include/wx-2.8/wx/treebase.h:75: note: candidates are:
> wxTreeItemId::wxTreeItemId(long int)
> /usr/include/wx-2.8/wx/treebase.h:59: note:
> wxTreeItemId::wxTreeItemId(void*)
> ../../src/treelistctrl.cpp: In member function ‘void
> wxTreeListMainWindow::PaintItem(wxTreeListItem*, wxDC&)’:
> ../../src/treelistctrl.cpp:3080: error: operands to ?: have different types
> ‘const wxString’ and ‘const char [2]’
> ../../src/treelistctrl.cpp: In member function ‘void
> wxTreeListMainWindow::OnChar(wxKeyEvent&)’:
> ../../src/treelistctrl.cpp:3492: error: conversion from ‘int’ to ‘const
> wxTreeItemId’ is ambiguous
> /usr/include/wx-2.8/wx/treebase.h:75: note: candidates are:
> wxTreeItemId::wxTreeItemId(long int)
> /usr/include/wx-2.8/wx/treebase.h:59: note:
> wxTreeItemId::wxTreeItemId(void*)
> ../../src/treelistctrl.cpp: In member function ‘void
> wxTreeListMainWindow::OnMouse(wxMouseEvent&)’:
> ../../src/treelistctrl.cpp:3938: error: conversion from ‘int’ to ‘const
> wxTreeItemId’ is ambiguous
> /usr/include/wx-2.8/wx/treebase.h:75: note: candidates are:
> wxTreeItemId::wxTreeItemId(long int)
> /usr/include/wx-2.8/wx/treebase.h:59: note:
> wxTreeItemId::wxTreeItemId(void*)
> ../../src/treelistctrl.cpp: In member function ‘void
> wxTreeListMainWindow::CalculateSize(wxTreeListItem*, wxDC&)’:
> ../../src/treelistctrl.cpp:4066: error: operands to ?: have different types
> ‘const wxString’ and ‘const char [2]’
> make: *** [treelistctrl.o] Error 1

Discussion

  • Ronan Chartois

    Ronan Chartois - 2009-09-14

    patch 1

     
  • Ronan Chartois

    Ronan Chartois - 2009-09-14

    patch 2

     
  • Ronan Chartois

    Ronan Chartois - 2009-09-14
    • priority: 5 --> 7
    • status: open --> open-accepted
     
  • Ronan Chartois

    Ronan Chartois - 2009-09-14

    - not reproduced yet, but I am familiar with some of the reported issues ==> Accepted
    - as component does not build, priority increased (not maximum since a patch already exists)

     
  • Ronan Chartois

    Ronan Chartois - 2009-09-20

    - fix tested with GCC 4.2 under Linux (Slax) / GTK2 ==> Works for me
    - asked Max to retest fix ==> Pending

     
  • Ronan Chartois

    Ronan Chartois - 2009-09-20
    • status: open-accepted --> pending-works-for-me
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-works-for-me --> closed-works-for-me
     

Log in to post a comment.