After hours of googling and options testing I've broken down and decided to ask for help.
I am trying to compile a test application for the STLPort libraries under MinGW and Msys.
I successfully compiled STLPort with
Code:
./configure --without-stlport --enable-static --use-static-gcc
CFLAGS / CXXFLAGS (set to same thing)
Code:
$ echo $CFLAGS
-I/e/MinGW/include -I/e/Build/STLport-5.2.1/stlport -L/e/MinGW/lib -L/e/MinGW/lib/gcc/mingw32/4.5.0/
I have made a basic main.cpp to test / try it out
Code:
#include <iostream>
using namespace std;
int main (int argc, char * argv[])
{
cout << "Hello World!" << endl;
}
and am compiling with the command
Code:
g++ -Wall -mthreads -I/usr/include/ -L/usr/local/lib/STLPort/ main.cpp -o main.exe -lstlport
And an ls of the two directories
Code:
$ ls /usr/include
algorithm climits cstdio errno.h hash_set iso646.h locale.h ostream setjmp.h stdio.h strstream using
assert.h clocale cstdlib exception iomanip istream map ostream.h signal.h stdiostream.h strstream.h utility
bitset cmath cstring exception.h iomanip.h istream.h math.h pthread.h slist stdlib.h time.h valarray
cassert complex ctime float.h ios iterator mem.h pthread_alloc sstream stl type_traits vector
cctype csetjmp ctype.h fstream ios.h limits memory queue stack streambuf typeinfo wchar.h
cerrno csignal cwchar fstream.h iosfwd limits.h new rlocks.h stdarg.h streambuf.h typeinfo.h wctype.h
cfloat cstdarg cwctype functional iostream list new.h rope stddef.h string unordered_map
ciso646 cstddef deque hash_map iostream.h locale numeric set stdexcept string.h unordered_set
Code:
$ ls /usr/local/lib/STLPort/
allocators.o collate.o ctype.o fstream.o libstlport.5.2.dll locale_impl.o num_get_float.o ostream.o string.o
bitset.o complex.o cxa.o ios.o libstlport.5.2.dll.a messages.o num_put.o sstream.o strstream.o
c_locale.o complex_io.o dll_main.o iostream.o locale.o monetary.o num_put_float.o stdio_streambuf.o time_facets.o
codecvt.o complex_trig.o facets_byname.o istream.o locale_catalog.o num_get.o numpunct.o stlport.res
when compiling I get the following output
Code:
[DIR_TO_TEMP_OMMITED]\ccP5OPug.o:main.cpp:(.text+0xf): undefined reference to `_imp___ZN8stlp_std4coutE'
[DIR_TO_TEMP_OMMITED]\ccP5OPug.o:main.cpp:(.text$_ZN8stlp_std8ios_base23_M_check_exception_maskEv[stlp_std::ios_base::_M_check_exception_mask()]+0x1f): undefined reference to `_imp___ZN8stlp_std8ios_base16_M_throw_failureEv'
collect2: ld returned 1 exit status
It seems to me like its not finding the 'included' library. What am I doing wrong here? I can compile w/o the STLPort libraries however MinGW (still) doesn't support unicode streams. I would really like said streams.