Compiling MFC
Gregory M. Turner
gmturner007 at ameritech.net
Fri Oct 3 12:52:30 CDT 2003
On Friday 03 October 2003 07:04 am, Adam Connell wrote:
> I am yet another programmer trying to compile the MFC with winelib.
> I believe that I have the project configured correctly. I am currently
> working on getting it to compile. I am having trouble with Microsoft's
> extensions to C++ specifically:
> throw(...)
> __try
> __except
>
> Is there any kind of work around for these things?
>
> MFC v7.0
> g++ v3.2.2
> wine-cvs
You have uncovered a very squirmy can of worms, I'm afraid.
You have several options, all of them sub-optimal:
1) Use a patched gcc, see http://reactos.wox.org/index.php?page=gccseh
2) Convert the __try blocks into __TRY blocks as supported by wine, see
include/wine/exception.h. This will require pretty extensive rewriting of
the affected code blocks.
3) Just use dummy macros, along the lines of those in include/rpc.h. This
approach will /not/ do any real exception handling, but will get you
compiling quickly... no guarantees your compiled code will work, however.
4) See my old attempts to create macros that approximate this using
gcc-specific nested functions capabilities, for example, see
http://www.winehq.com/hypermail/wine-devel/2003/05/0394.html
There are probably a dozen or more such attempts floating around, none of them
quite do the right thing of course :(
Sorry, this business is messy and so far no really satisfactory solution has
been created for a number of reasons. Good luck!
--
gmt
"Every normal man must be tempted, at times, to spit on his
hands, hoist the black flag, and begin slitting throats."
-- H. L. Mencken
More information about the wine-devel
mailing list