STLPort and wxUSE_STL compilation error

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
pkullmann
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Nov 30, 2006 6:15 pm

STLPort and wxUSE_STL compilation error

Post by pkullmann » Fri Dec 15, 2006 4:06 pm

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

Kervala
Earned a small fee
Earned a small fee
Posts: 23
Joined: Thu Sep 02, 2004 1:41 pm
Location: France
Contact:

Post by Kervala » Thu Dec 28, 2006 2:08 pm

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...

pkullmann
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Nov 30, 2006 6:15 pm

Post by pkullmann » Fri Jan 05, 2007 9:50 am

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

Kervala
Earned a small fee
Earned a small fee
Posts: 23
Joined: Thu Sep 02, 2004 1:41 pm
Location: France
Contact:

Post by Kervala » Fri Jan 05, 2007 10:44 am

You're right :)

I didn't look for files without extension :s

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

Post Reply