Sign in to follow this  
derek7

code translate from window to linux

Recommended Posts

what part do I need to alter? Is c++ stl different lib from linux and windows? Are there some windows sdk substitue on linux? like gdi window function etc... Is crt header file need to change? I mean crt header file is different from window. Anything I forgot?

Share this post


Link to post
Share on other sites
The STL, at least, is standard, and shouldn't need to change.

From searching, it seems you should look into the keywords "WINE" and "GTK".

http://www.freelabs.com/~whitis/linux/porting_windows.html

Share this post


Link to post
Share on other sites
STL is platform independent.

Every single line dealing with the Windows API is not platform independent. A nice C++ way would be the use of wrapper classes around controls, which you can do for all platforms you support. Then build a factory which creates the correct control for the platform it currently runs on.

And yes, you can use SDL on almost any platform.

Share this post


Link to post
Share on other sites
Quote:
Original post by johnnyBravo
What so for linux's different desktops you have to code the window specifically to them? And can't you just use SDL?


GTK apps will generally run under KDE as long as you have the appropriate libraries, and vice versa.

Share this post


Link to post
Share on other sites
Quote:
Original post by johnnyBravo
What so for linux's different desktops you have to code the window specifically to them? And can't you just use SDL?


SDL doesn't do windows. GTK, KDE, wxWidgets etc are what should be used. Or just hack it straight out of X11 and make your own Widgets [smile]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this