code translate from window to linux

Started by
6 comments, last by Bregma 18 years, 1 month ago
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?
Advertisement
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
--== discman1028 ==--
What so for linux's different desktops you have to code the window specifically to them? And can't you just use SDL?
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.

Crafter 2D: the open source 2D game framework

?Github: https://github.com/crafter2d/crafter2d
Twitter: [twitter]crafter_2d[/twitter]

Also wxWidgets and FLTK.
Free Mac Mini (I know, I'm a tool)
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.
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]
Adventures of a Pro & Hobby Games Programmer - http://neilo-gd.blogspot.com/Twitter - http://twitter.com/neilogd
Qt provides you with a portable library (Mac OS, Windows, Linux/X11, embedded) that covers almost everything you need, including an OpenGl interface. It's also free as long as you're writing free software.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement