|
Win32Plugin gives Xcode, Apple's development environment, the possibility to fully drive a GNU c/c++ cross-compiler for MSWindows (95 and above). Win32Plugin works with versions 2.5, 3.1.*, and 3.2 of Xcode.
Win32Plugin allows a single Xcode project to build executables for MacOS X and MSWindows platforms. |
|
defaults write com.apple.Xcode win32gxxpath /full/path/to/mingw32-g++ defaults write com.apple.Xcode win32gccpath /full/path/to/mingw32-gcc defaults write com.apple.Xcode win32arpath /full/path/to/mingw32-ar
The easiest would be to modify the hello Xcode project by adding more elaborate source files, and possibly pre-compiled libraries. This project contains FLTK 1.1.8 header files and libraries for MacOS X, Darwin+X11, MSWindows. You can replace them by your own, or by other FLTK versions.
Alternatively, add a Win32 target to an existing project of yours by the "New target..." command, or create a new Win32 project by the "New project..." command. The Assistant window allows to choose Win32 program or library. Add the relevant c/c++ source files to the newly created win32 target. After that, open the Info window of this target, go to the Rules view, and modify the System C rule: change "using: GCC System Version (4.0)" into "using: Win32 C/C++". Next, go to the Build view, and set the compiler & linker settings, namely header and library search paths and Win32Plugin's own ones (see table below).
MSWindows system libraries (e.g., ole32.dll) can be added to your target as follows:
Win32Plugin can produce and use libraries as well as executables.
Win32Plugin-specific settings | Usage | |
---|---|---|
GCC_GENERATE_DEBUGGING_SYMBOLS | when on, adds "-g" to compilation and link operations | |
OPTIMIZE | to add "-O1", "-O2", or "-O3" to compilations | |
WARNING_AS_ERROR | when on, adds "-Werror" to compilations | |
ALL_WARNINGS | when on, adds "-Wall" to compilations | |
OTHER_WIN32_FLAGS | to add any additional options to compilations | |
USE_WIN32_GUI | when on, adds "-mwindows" to the link command | |
WIN32_SYSTEMLIBS | set this to "-Wl,-lname1,-lname2,..." to link with named system libraries | |
OTHER_WIN32_LDFLAGS | to add any additional options to the link command |