The idea being I have some C code, calls a load of NT stuff like
CreateFileMapping, CreateFile, OpenMutex and many other old favorites.
I'd like to "simply" port the src code, compile and like with some
"win32_linux" library and hey-presto she runs.
I doubt that this is possible, but what do you guys think?
Thanks
Hugh
It is not possible. However on linux there is windows emulation software
- wine which you can use to run windows apps. See http://www.winehq.org/.
It is not possible. However on linux there is windows emulation software
It is not possible. However on linux there is windows emulation software
You don't need to do a thing:
http://en.wikipedia.org/wiki/Wine_(software)
It redirects the calls to Linux equivalent, so OS functions run at full
speed, so there is just the call translation overhead to worry about.
A few others have pointed you to the Wine project. As they have pointed
out, Wine is a fine environment to run your binaries that have been
compiled for x86 Windows on an x86 Linux box (an x64 port of Wine is
currently in development, but I haven't yet tried it). You should give
that a try, I always find it surprising how much of Win32 actually works
on Wine.
But using winelib, you can also achieve what you *really* want: Take
your Win32 code and compile it with gcc and link against winelib. This
will give you a native executable that doesn't require Wine to be
installed on client linux boxes.
However, things could get somewhat problematic if your code is more than
plain Win32 without libraries licensed from MS: IANAL, so I don't know
if there are licensing issues if your code uses MFC or ATL and you have
to create an equivalent of mfcxx.dll or nafxcw.lib using winelib.
--
S
"Stefan Kuhr" wrote:
> .
>
Hmm, I wonder if winelib provides any of the "undocumented" NT calls like
those used for manipulating kernel namespaces and stuff?
I guess there is a list of supported functions, so let me look...
Hugh
On 3/18/2010 4:02 PM, Hugo gle...@hotmail.com> <hugh wrote:
> <snip>
> Hmm, I wonder if winelib provides any of the "undocumented" NT calls like
> those used for manipulating kernel namespaces and stuff?
>
> I guess there is a list of supported functions, so let me look...
>
My understanding is that winelib exposes the exact same functionality as
a wine build of the same version does, because they share the same code.
So I would expect that if your app fails to run under Wine, it will also
not work when built natively against winelib. So simply try your
existing build on a current build of Wine and see if it works. My
recommendation is to download and build the latest build (1.1.40) on
your own and not necessarily use an older version that is among those
that can be installed from the package manager of your Linux distro.
--
S