[Wine] Why msvcrt generates errors ?

carugnom wineforum-user at winehq.org
Thu Dec 2 07:49:47 CST 2010

Hello winers

I'm doing a little excersice.
A minimal source

  #include <string>
  int main(void)
    return 0;

So, if i compile that with:

  g++ -I/usr/include/wine/msvcrt -c myfile.cpp

I get errors like:

  In file included from /usr/include/c++/4.4/bits/postypes.h:42,
                 from /usr/include/c++/4.4/bits/char_traits.h:42,
                 from /usr/include/c++/4.4/string:42,
                 from myfile.cpp:1:
  /usr/include/c++/4.4/cwchar:148: error: ‘::fwide’ has not been declared

The question is:
If i pass the -I option to the compiler intructing it to search <string> in wine FIRST (the c++ headers are searched in last instance, right ?), why the compiler shows that is using string.h from c++ ?
If string.h is found in the wine includes, string.h from c++ is also used then ?
I don't expect this behavior. I expected a correct compilation (just compilation, i'm not linking here).

More information about the wine-users mailing list