Wine HQ

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

Writing the spec file

5.2. Writing the spec file

Start by writing the spec file. This file will describe the interface as if it were a DLL. See elsewhere for the details of the format of a spec file (e.g. man winebuild).

In the simple example we want a Wine built-in Dll that corresponds to the MyWin Dll. The spec file is MyWin.dll.spec and looks something like this:

#
# File: MyWin.dll.spec
#
# some sort of copyright
#
# Wine spec file for the MyWin.dll built-in library (a minimal wrapper around the
# linux library libMyLinux)
#
# For further details of wine spec files see the Winelib documentation at
# www.winehq.org

2 stdcall MyWinFunc (long ptr ptr ptr ptr long long ptr) MyProxyWinFunc

# End of file
Notice that the arguments are flagged as long even though they are smaller than that. With this example we will link directly to the Linux shared library whereas with the ODBC example we will load the Linux shared library dynamically.

In the case of the ODBC example you can see this in the file odbc32.spec.