STLport¶
How to use both standard STL and STLport ?¶
1#define _STLP_DONT_REDEFINE_STD
2#define _STLP_WHOLE_NATIVE_STD
3
4#include <string>
5
6void foo()
7{
8 std::string std_str("std");
9 stlport::string stlport_str("stlport");
10 stlport_str.append(std_str.begin(), std_str.end());
11 // Following is wrong because there is no assignment
12 // operator for stlport::string on std::string.
13 //std_str = stlport_str;
14}
How to use STLport with GCC ?¶
Only include STLport includes with -I/usr/include/stlport and link with -lstlport

