diff --git a/documentation/winelib-mfc.sgml b/documentation/winelib-mfc.sgml index 2f43aec3ca3..7f46226fdbb 100644 --- a/documentation/winelib-mfc.sgml +++ b/documentation/winelib-mfc.sgml @@ -138,13 +138,80 @@ Compiling the MFC - Things to disable, - why we have to disable them (lack of Wine support), - where things don't compile, - why, - how to solve it, - what to put in the Makefile, - maybe try to point to a place with a ready-made makefile... + Here is a set of recommendations for getting the MFC compiled with + WineLib: + + + We recommend running winemaker in + '' mode to specify the right + options for the MFC and the ATL part (to get the include paths + right, to not consider the MFC MFC-based, and to get it to + build libraries, not executables). + + + Then when compiling it you will indeed need a number of + _AFX_NO_XXX macros. But this is not enough + and there are other things you will need to + '#ifdef-out'. For instance Wine's richedit + support is not very good. Here are the AFX options I use: + + + +#define _AFX_PORTABLE +#define _FORCENAMELESSUNION +#define _AFX_NO_DAO_SUPPORT +#define _AFX_NO_DHTML_SUPPORT +#define _AFX_NO_OLEDB_SUPPORT +#define _AFX_NO_RICHEDIT_SUPPORT + + + + You will also need custom ones for + CMonikerFile, OleDB, + HtmlView, ... + + + We recommend using Wine's msvcrt headers (-isystem + $(WINE_INCLUDE_ROOT)/msvcrt), though it means you + will have to temporarily disable winsock support + (#ifdef it out in + windows.h). + + + You should use g++ compiler more recent than g++ 2.95. g++ + 2.95 does not support unnamed structs while the more recent + ones do, and this helps a lot. Here are the options worth + mentioning: + + + + -fms-extensions (helps get more code + to compile) + + + + + -fshort-wchar -DWINE_UNICODE_NATIVE + (helps with Unicode support) + + + + + -DICOM_USE_COM_INTERFACE_ATTRIBUTE + (to get the COM code to work) + + + + + + When you first reach the link stage you will get a lot of + undefined symbol errors. To fix these you will need to go back + to the source and #ifdef-out more code + until you reach a 'closure'. There are also some files that + don't need to be compiled. + + + Maybe we will have ready-made makefile here someday...