problems compiling mfc with winelib

Doug Alcorn doug at lathi.net
Wed Mar 21 22:26:04 CST 2001


I have a small apps with only about half a dozen dialogs.  It was
originally developed in MS-DevStudio.  Our desire is to use the same
code between MS-Windows and Linux/Unix using the winelib.  This app is
derived from CWinApp and uses mfc for all the widgets.  I'm told it
would take too much effort to redo the app without mfc (I'm not a
windows programmer, and don't know much about all that).  So, my
assumption based on reading winehq.com is that I need to compile the
mfc using winelib.

I got all the code over to my linux box and converted all the
files/directories to lowercase only.  I got the mfc, atl, and some
other include directory that was under "Program Files/Visual
Studio/VC98" (or something similar).  I ran winemaker on the mfc
directory and successfully got the configure script built.  The
problem is getting the make files built.

I had to define both CFLAGS and CPPFLAGS "-D_WIN32 -DWIN32 -D_WINDOWS
-D_MBSC" in the environment.  Here's my configure line:

$ ./configure --with-win=/path/to/wine/sources
--with-atl-includes=/path/to/atl/includes
--with-mfc-includes=/path/to/parent/of/mfc/includes

It goes allong pretty well until it checks for afx.h. That's when it
bombs majorly.  I get pages and pages of compile time errors in the
config.log.  Lots of parse errors, syntax errors, scoping errors,
redifinitions... lots of stuff.

Am I right that I have to compile mfc?  Is this something that most
developers using winelib to compile windows programs do?  Are there
instructions for doing so?  At this point I'm totally stumped.  I'm
not about to start debugging mfc.  I'll re-write the app before I do
that.  What is the suggested course of action?
-- 
(__) Doug Alcorn <doug at lathi.net> http://www.lathi.net
oo / PGP 02B3 1E26 BCF2 9AAF 93F1  61D7 450C B264 3E63 D543
|_/  If you're a capitalist and you have the best goods and they're
     free, you don't have to proselytize, you just have to wait.




More information about the wine-devel mailing list