Windows.h cannot be found using Winemaker/Winelib

1k Views Asked by At

currently i'm trying to port a Windows program to Linux, more specific a DLL. The code is written in C++ and uses many Winapi calls. Since i don't want to rebuild the whole thing from scratch i thought recompiling with Winelib is a good start and worth a try but i have never used it before. So i used Winemaker to prepare the code and create a Makefile. Using make prints out an error that says windows.h cannot be found. Well, i'm using Ubuntu right now, so of course it can't be found but i thought using wineg++ would take care of such things by underlaying a wineapi-layer. I read the Winelib Userguide but it seems like i don't really get the concept.
What am i missing here? This surely won't be the last Problem i'm encountering with Winelib

1

There are 1 best solutions below

0
On

It's not a perfectly fitting solution but drdobbs.com posted in interesting article about wine, winelib and porting to Linux here. So using winemaker and wineg++ is a good start but one also have to add the Compiler directive -Iwine/include. there are the equivalents to windows.h etc. hidden. It also says that code compiled that way still needs Wine to work properly to ensure that hardcoded paths like C:\Program Files\... are still available. If These aren't existing, it may work without Wine, but i'm absolutely NOT sure about this.