I have several Win32 console applications. I want to migrate them to Linux, and have installed and configured Wine. My target is to migrate the programs via winelib. So I don't want to run my applications on the fly as windows binary code, but recompile them in Linux enviroment and use following WINE console display functions: WriteConsoleOutput SetConsoleCursorPosition GetStdHandle FlushConsoleInputBuffer SetConsoleMode ReadConsoleOutput ScrollConsoleScreenBuffer GetConsoleCursorInfo SetConsoleCursorInfo GetNumberOfConsoleInputEvents ReadConsoleInput
The first step is recompile C modules, but I find unexpected errors. Here is the output I get recompiling code.
In file included from /usr/comun/src/mc_vis32.cpp:201: /opt/wine/include/wine/wincon.h:25: parse error before `__attribute__' /opt/wine/include/wine/wincon.h:229: `PHANDLER_ROUTINE' was not declared in this scope . . .
Inspecting code, I notice the error always relates to the typedef PHANDLER_ROUTINE. I don't find it in any include and don't know where it's implemented. But the compiler doesn't find it.
Does anyone know where to find this definition ?
Which include file should I add to compilation process ?
Could anyone help me ?
Thanks in advance. Ignasi Villagrasa. GRI S.L.
On Mon, 18 Feb 2002, Ignasi Villagrasa wrote:
[...]
PHANDLER_ROUTINE is declared in wincon.h:
typedef BOOL (WINAPI *PHANDLER_ROUTINE)(DWORD dwCtrlType);
gcc is probably confused by the WINAPI (which gets parsed into __attribute__((stdcall)) or something similar). It seems we keep having trouble with the placement of WINAPI. You could try the following placements:
typedef BOOL (* WINAPI PHANDLER_ROUTINE)(DWORD dwCtrlType); typedef BOOL WINAPI (*PHANDLER_ROUTINE)(DWORD dwCtrlType);
The problem is that the above are not very standard and quite likely to not compile with other compilers.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ 145 = 1! + 4! + 5!