Jump to content
  • Advertisement
Sign in to follow this  
derek7

code translate from window to linux

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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

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
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!