Wine HQ

  WineHQ Menu
  WineHQ
  AppDB
  Bugzilla
  Wine Wiki
  Wine Forums
  About
  Introduction
  Features
  Screenshots
  Contributing
  News
  Press
  License
  Download
  Get Wine Now
  Support
  Support
  Getting Help
  FAQ
  Documentation
  HowTo
  Live Support Chat
  Paid Support
  Development
  Development
  Developers Guide
  Mailing Lists
  GIT
  Sending Patches
  To Do Lists
  Fun Projects
  Janitorial
  Winelib
  Status
  Resources
  WineConf
  Search WineHQ

Portability issues

Chapter 2. Portability issues

Table of Contents
2.1. Unicode
2.2. C library
2.3. Compiling Problems

2.1. Unicode

The wchar_t type has different standard sizes in Unix (4 bytes) and Windows (2 bytes). You need a recent gcc version (2.9.7 or later) that supports the -fshort-wchar option to set the size of wchar_t to the one expected by Windows applications.

If you are using Unicode and you want to be able to use standard library calls (e.g. wcslen, wsprintf), then you must use the msvcrt runtime library instead of glibc. The functions in glibc will not work correctly with 16 bit strings.