[Wine] winelib + g++ standard template library

Matthew Fulmer tapplek at gmail.com
Sun Feb 19 22:54:37 CST 2006

I am porting a program from windows that uses both windows
specific header files, like <winsock.h> and <process.h>, and c++
standard template library header files, like <string> and <vector>.

I only have the g++ template library, and it depends on the gnu
libc. However, the program I am building depends on the msvc
libc. Thus I have impossible dependencies in the same program.

There are several possible solutions:

1. use a different c++ stl; one that is not specific to gnu
   libc. I don't know of any others for linux

2. make a wrapper that lets g++ stl build with msvcrt. This
   would not be very difficult i believe; the reason the g++ stl
   won't build is because libc exports functions in the std
   namespace if __cplusplus is defined

3. change something so that stdlib.h is not defined both places
   (gnu libc and msvcrt)

What is the proper solution? I could probably implement 2 and
submit a patch; it would just involve implementing the header
file <cstdlib>

Matthew Fulmer

More information about the wine-users mailing list