Porting Linux & Windows
Is it possible to create a program that ports easily between X Windows and Windows 9x? If so, what would I use?
I''m kinda new to programming on any Windowing system, except with Visual Basic. But I want to create easily portable C++ code. Any advice?
Yes, I finally registered myself with Gamedev.net.
-CobraA1
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away"--Henry David Thoreau
quote: Original post by CobraA1
Is it possible to create a program that ports easily between X Windows and Windows 9x? If so, what would I use?
I don''t think such a program exists. But no doubt someone will prove me wrong.
![](smile.gif)
Your first step is to make sure that you only use ANSI C/C++ functions wherever possible. The ''ANSI''ness of a function is detailed in the help files for both MSVC and Borland C++ Builder, so you can find out before you use anything. As far as libraries/frameworks go, MFC is a no-no, as is ATL, OWL, and VCL. STL is portable though, and for games there are numerous portable libraries you can look into. I haven''t used many of these yet, but OpenGL is obviously the most well known. OpenAL is worth considering for audio too I think. And SDL (Simple DirectMedia Layer) is apparently being used to port top-quality games, see www.devolution.com/~slouken/SDL/.
Any functions you use that are prefixed with two underscores are also sometimes cause for concern, as they are implementation specific and therefore may not work anywhere else.
Hope that gets you started, I''m sure some more knowledgeable people than myself could add to that list.
Actually many of the windowing toolkits available for X Windows have windows ports. I think GTK and Qt both do. So theoretically you can code a UI in GTK and have it work in Windows.
Also, for the more game oriented, there are cross-platform APIs available that will let you code for multiple target platforms. ClanLib comes to mind immediately. glut is also cross-platform, but less suitable for gaming (not bad for effects demos though). Also the next version of glut is supposed to have improved input interfaces for gaming.
Also, for the more game oriented, there are cross-platform APIs available that will let you code for multiple target platforms. ClanLib comes to mind immediately. glut is also cross-platform, but less suitable for gaming (not bad for effects demos though). Also the next version of glut is supposed to have improved input interfaces for gaming.
-- SiCrane Said --
Actually many of the windowing toolkits available for X Windows have windows ports. I think GTK and Qt both do. So theoretically you can code a UI in GTK and have it work in Windows.
-- End of SiCrane''s Quote --
This is totaly true. GTK and QT both have MS Windows port. All you need to do is compile it on Windows, then take the code and Compile it under Linux. That''s all. I for one has used the GTK widgets and it''s just awesome...
Cyberdrek
Headhunter Soft
DLC Multimedia
Two Guys Soft
Actually many of the windowing toolkits available for X Windows have windows ports. I think GTK and Qt both do. So theoretically you can code a UI in GTK and have it work in Windows.
-- End of SiCrane''s Quote --
This is totaly true. GTK and QT both have MS Windows port. All you need to do is compile it on Windows, then take the code and Compile it under Linux. That''s all. I for one has used the GTK widgets and it''s just awesome...
Cyberdrek
Headhunter Soft
DLC Multimedia
Two Guys Soft
[Cyberdrek | ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement