STLPort 5.1 and winegcc / winelib

Boaz Harrosh boaz at electrozaur.com
Tue Dec 19 06:38:07 CST 2006


gendo at cox.net wrote:
> I was wondering if anyone had tried STLPort 5 with winelib. From searching the archives it seems you need to swap out gcc/c++ for winegcc/wineg++ and pass the -mno-cygwin option. Doing that gives me these errors. 
>
> make -f gcc.mak all
>
> wineg++ -pthread -mno-cygwin -fexceptions -fident  -fPIC -O2 -fuse-cxa-atexit  -D_REENTRANT -D_GNU_SOURCE -I../../stlport  -c -o obj/gcc/so/dll_main.o ../../src/dll_main.cpp
> /usr/include/../include/stdlib.h:469: error: expected ‘;’ before ‘*’ token
> /usr/include/../include/stdlib.h:470: error: expected ‘;’ before ‘*’ token
> /usr/include/../include/stdlib.h:471: error: expected ‘;’ before ‘*’ token
> /usr/include/../include/stdlib.h:475: error: expected ‘;’ before ‘*’ token
> /usr/include/../include/stdlib.h:479: error: ‘int32_t’ has not been declared
> winegcc: g++ failed.
> make: *** [obj/gcc/so/dll_main.o] Error 2
>
> Anyway these are probably from grabbing the system headers which I have read you should not have happen, but if I try to use a -isystem/usr/include/wine/msvcrt or -Isystem/usr/include/wine/msvcrt and -nostdinc++ you then get tons of errors about the stl headers missing exception, cstring, etc. I was wondering if anyone had any thoughts or ideas on how to get this compiled so it is usable is porting applications.
>
> Thanks
>
>
>
>   
look at, and download from: http://sourceforge.net/projects/onesource/
(If you use KDE it has a phantom folder inside watch out)

You will see an STLport folder and a wine\include\msvcrt folder and also
the Makefiles.
This is all very old, pre-winegcc. STLPort 4.6.x, but the principle is
there. A wine.mac for STL to compile over msvcrt from wine, a config.h
or what ever it is I can't remember. And the most important is
"typeinfo" and "new" header files in wine/include/msvcrt.

I can hardly remember all the details but in principle. Configure
STLport to use all it's internal implementations (see wine
stlport-config files inside). And like you tried, don't let GCC use any
of it's headers. Than the only missing headers will be "typeinfo" and
"new". Also I think I had to play with include path a bit, or put some
headers in stlport/include that include other headers of same name from
wine. It did work at the end, let the compiler guide you. Also look back
in 2004/2005 archives I remember I had a much more detailed description
of what to do exactly. Search for "stlport". (You are not the first one
that asks)

Please note:
- wine headers are very old, use new wine headers with what ever is
missing from my zip file.
- the "typeinfo" and "new" files are basically the GPLed files from GCC
a bit modifies so they compile. See if you need to do it again to newer
GCC files, what ever the GCC version you have.
- Some more headers can be found at msvc/include folder that had a bit
of magic to glue every thing together, but that was more for MFC and ATL
stuff, I'm not sure STLport needed any of that. I think you need MBCS
defined for msvcrt to have all that STLPort needs.

Free Life
Boaz





More information about the wine-devel mailing list