Page 1 of 1

STLPort and wxUSE_STL compilation error

Posted: Fri Dec 15, 2006 4:06 pm
by pkullmann
wxWidgets 2.8.0
STLPort 5.1.0
MSVC 8

With this configuration, compiling many of the samples produces compilation errors in the WX_LIST macros: 'no definition for std::greater'

Fix: Place '#include <functional>' in line 37 of file wx/list.h

Posted: Thu Dec 28, 2006 2:08 pm
by Kervala
I have the same problem and I added :

Code: Select all

#include <stl/_function.h>
after :

Code: Select all

#include <list>
in "include/wx/list.h" around line 40

I noticed "greater" struct is not included in STLport so we had to include ourself :)

Edit: Btw STLport 5.0.2 compiled fine without any edit...

Posted: Fri Jan 05, 2007 9:50 am
by pkullmann
I think stl/_function.h is specific to STLPort whereas #include <functional> should be portable across stl implementations. Note, that in STLPort functional includes stl/_function.h

Posted: Fri Jan 05, 2007 10:44 am
by Kervala
You're right :)

I didn't look for files without extension :s

I was only searching in *.h and *.cpp files :(