tags:

views:

111

answers:

2

I have heard of WINE but I don't like it because it's slow on the computers I have tested and almost always crashes. It also has some unpleasant looking gui.
I am wondering if there is a "win32" library in c/c++ for linux that produces native linux code
so that if I have my source code for windows, I can just recompile and produce a working linux application. Is this possible?

+3  A: 

What you want is a portable library, e.g. Boost or Qt.

Bastien Léonard
yes, I have heard of qt. But as far as i know , it does not support win32 calls. Like most programmers i wonder if it is possible to avoid learning a new api for graphics
Dr Deo
+½: +1 for recommending good libraries that would be useful in writing a truly cross-platform application right from the start; -½ because this doesn't seem to be what the OP is asking for.
stakx
@stakx: I agree, but native APIs aren't designed to be portable. If he wants to write code which will result in native executables on Windows and Linux with a good-looking UI, he has to use something else.
Bastien Léonard
+1 These portable libraries will also make it possible to compile your program for Mac. For a C++ programmer, these libraries are well worth the trouble to learn.
Emile Cormier
(@Bastien: I completely agree with you, and I would suggest the same thing. But it seems like the OP _is_ specifically looking for a port of a native API.)
stakx
+2  A: 

You're looking for Winelib.

Ignacio Vazquez-Abrams