Compiling 7zG on Slackware 13.1 with wxWidgets 2.9 installed, I'm getting the following error:
cd CPP/7zip/UI/GUI ; make all
make[1]: Entering directory `/usr/local/src/builds/p7zip_9.13/CPP/7zip/UI/GUI'
g++ -O -pipe -m32 -s -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX -D_7ZIP_LARGE_PAGES -DUNICODE -D_UNICODE -DLANG -DEXTERNAL_LZMA -DEXTERNAL_CODECS -DBENCH_MT -I. `wx-config --unicode=yes --cxxflags` -DHAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden -c -I. -I../../../myWindows -I../../../ -I../../../include_windows ../../../Windows/Control/Controls.cpp
../../../Windows/Control/Controls.cpp: In member function 'bool NWindows::NControl::CListView::SortItems(INT (*)(LPARAM, LPARAM, LPARAM), LPARAM)':
../../../Windows/Control/Controls.cpp:492: error: invalid conversion from 'INT (*)(LPARAM, LPARAM, LPARAM)' to 'int (*)(long int, long int, wxIntPtr)'
../../../Windows/Control/Controls.cpp:492: error: initializing argument 1 of 'bool wxGenericListCtrl::SortItems(int (*)(long int, long int, wxIntPtr), wxIntPtr)'
make[1]: *** [Controls.o] Error 1
make[1]: Leaving directory `/usr/local/src/builds/p7zip_9.13/CPP/7zip/UI/GUI'
make: *** [7zG] Error 2
In looking over the function definitions and calls for param 1 of CListView::SortItems where they are defined in the source code:
grep -nr CompareItems *
7zip/UI/FileManager/PanelItems.cpp:179:// int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData);
7zip/UI/FileManager/PanelItems.cpp:184: CompareItems_WX(long item1, long item2, long sortData);
7zip/UI/FileManager/PanelItems.cpp:463: _listView.SortItems(CompareItems_WX, (LPARAM)this);
7zip/UI/FileManager/BrowseDialog.h:58: int CompareItems(LPARAM lParam1, LPARAM lParam2);
7zip/UI/FileManager/PanelSort.cpp:21:static int CALLBACK CompareItems2(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
7zip/UI/FileManager/PanelSort.cpp:84:static int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData)
7zip/UI/FileManager/PanelSort.cpp:99: int result = CompareItems2(lParam1, lParam2, lpData);
7zip/UI/FileManager/PanelSort.cpp:108: CompareItems_WX(long item1, long item2, long sortData)
7zip/UI/FileManager/PanelSort.cpp:110: return CompareItems(item1,item2,sortData);
7zip/UI/FileManager/PanelSort.cpp:138: _listView.SortItems(CompareItems_WX, (LPARAM)this);
7zip/UI/FileManager/PanelSort.cpp:167: _listView.SortItems(CompareItems, (LPARAM)this);
It appears that all the parameters are for LPARAM, which is defined as a long. However, in /usr/include/wx-2.9/wx/generic/listctrl.h, SortItems wants a wxIntPtr, which according to /usr/include/wx-2.9/wx/defs.h, can be either a ssize_t or a long. I'm guessing, on my box, it's a ssize_t since it's complaining about it being defined as a long.
I don't know enough about C++ programming to fix the problem, otherwise I'd take care of it and submit a patch.
I hope this helps.
Will
Ok, I played around last night and today and managed to come up with a patch that works. I don't know if it's a good one, but here it is.
Patch to resolve wxWidgets SortList compile bug