Unable to compile MFC application with libwine

Questions about Wine on Linux
Locked
skerit
Newbie
Newbie
Posts: 3
Joined: Sun May 05, 2013 8:39 am

Unable to compile MFC application with libwine

Post by skerit »

Hey everyone,

I've been following the Winelib User Guide in order to compile an old Visual Studio C++ game. The code is from about 1999, fyi.

I'm using winemaker to create my Makefile, like so:

Code: Select all

    winemaker --lower-uppercase --mfc "Kipdola.dsp"
This seems to work fine, but when I try to `make` it I get this error:

Code: Select all

    stdafx.h:14:10: fatal error: afxwin.h: No such file or directory
    #include <afxwin.h>
`stdafx.h` is a file in my project's folder, and it then tries to include `afxwin.h` (which I assume is an MFC file), but fails.

The guide isn't entirely clear on where these files should come from, but after some googling I came to realize I had to supply these myself in some way. So I installed Vistual Studio 6 in my main `.wine` prefix.

This didn't really help, though. I still get the same error.

I see the Makefile has this declaration in the "Common settings" section:

Code: Select all

    INCLUDE_PATH          = $(MFC_INCLUDE_PATH)
I don't think this `MFC_INCLUDE_PATH` has been defined anywhere, so I tried to compile it like this:

Code: Select all

    MFC_INCLUDE_PATH=/home/skerit/VC98/MFC/INCLUDE/ make
But I still got the same error. (And yes, I also ran `winemaker` in THAT include folder, as all files were uppercased)
I also tried to change the include statement to `#include "afxwin.h"`, but that also did nothing.

So does anyone know where it's going wrong and what I can do to fix it?

Btw: I don't know how old the content of that guide is. It initially directed me to ask for help on the [email protected] mailing list, which I did. Only afterwards I saw that that mailing list is NOT for bug reports or user support questions.
jlsogorb
Newbie
Newbie
Posts: 1
Joined: Mon Mar 18, 2019 5:27 pm

Re: Unable to compile MFC application with libwine

Post by jlsogorb »

Hi,
I have the same problem compiling an MFC app . Could you fix the problem?
Thank you.
Locked