Discussion:
Translate Win32 code to GCC?
(too old to reply)
Thomas Junior
2003-10-14 13:45:18 UTC
Permalink
I have a theoretical question...

Sure, emulators like WINE are great, lovely. Hats off to 'em. But damn if it
isn't a pain in the ass to find hardware for my Linux box, and then to
actually get it to work... In some cases, there are needs that simply aren't
met, like my satellite modem. The companies just don't put out the drivers.

So I was thinking that it would be great if there were an easy way to
translate a driver from C/C++ written for Win32 to code that would compile
on gcc. It's not like a Win32 machine can do anything a Linux machine can't
do (or vice-versa), you're just calling functions with different names.

Think of it: copy your code to a Linux box, type foocc instead of gcc, and a
short compile later your software is supporting Linux.

I know why my employer won't start supporting Linux: cost. We have too much
money tied up in writing programs for microsoft. To go back and re-code
wouldn't be economical and would probably run us out of business.

So, does anyone think that's a possibility, or am I underthinking?

Thanks!
Tom Junior

--

Tom Bitsky, Jr
***@automateddesign.com

Automated Design Corporation
P: (630) 783-1150 F: (630) 783-1159
R.F. Pels
2003-10-14 19:24:24 UTC
Permalink
Post by Thomas Junior
So I was thinking that it would be great if there were an easy way to
translate a driver from C/C++ written for Win32 to code that would compile
on gcc. It's not like a Win32 machine can do anything a Linux machine
can't do (or vice-versa), you're just calling functions with different
names.
<snip>
Post by Thomas Junior
So, does anyone think that's a possibility, or am I underthinking?
You are. Since Wine is not exactly an emulator in the sense that it emulates
a processor or computer that runs Windows. Wine runs Windows programs on
the native processor and glues Windows API calls to the underlying OS /and/
X.
--
Ruurd
Burgess Meredith
2003-10-15 00:46:04 UTC
Permalink
Post by Thomas Junior
I have a theoretical question...
welll....

you're company is called 'automated design' right?

so you could probably write something.

the difference here is that it would probably have to
have some type of 'smarts' to it -- because unlike
a syntax conversion where a small set of rules could
be created to map constructs to each other, what we're
talking here is completely different CONTENTS not
CONTEXTS -- so, the critical part would be a database
of mapable syscalls to win32 apis, so that such a
translation could occur.
Post by Thomas Junior
I know why my employer won't start supporting Linux: cost. We have too much
money tied up in writing programs for microsoft. To go back and re-code
wouldn't be economical and would probably run us out of business.
?? What ?

If you can make profits selling linux products, maybe
you would come out on top.
Post by Thomas Junior
So, does anyone think that's a possibility, or am I underthinking?
Thanks!
Tom Junior
--
Tom Bitsky, Jr
Automated Design Corporation
P: (630) 783-1150 F: (630) 783-1159
Loading...