Porting from Windows to Linux

Linux specific forum
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

Porting from Windows to Linux

Post by Johan_Haegg »

When porting from windows to Linux (never written any program in Linux), what can i exchange these commands with:
GetTickCount_()
GetForeGroundWindow_()

Should do about the same thing...
Akuma no Houkon
User
User
Posts: 77
Joined: Sun Nov 02, 2003 1:47 pm
Location: Washington
Contact:

Post by Akuma no Houkon »

There are many you can, it depends on what you are using. Are you using KDE, Gnome, etc..., something compatible with all, etc... Try searching for XWindows API Libraries, those are compatible with all windows managers. I havent found exact replacements for either of those but they do exist within X11 (XWindows) API. Probably not built into PureBasic like most windows API are so you will have to LoadLibrary and CallFunction to use them.
AMD 2600+, nVidia Geforce FX 5200 128 MB DDR, 512 DDR, RedHat 9
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

Post by Johan_Haegg »

Ill try that, as long as they do the same thing i dont have to rewrite loads and loads of code :>
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

I thought there is a compiler definition switch that can be use in the code, so you can keep the same code base but add in alot of #IF/#THEN switches to check what OS it is running on, and execute code based on the OS.

Am I wrong? Maybe Im thinking of another language.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Fred mentioned that next version of PB Linux will have ElapsedMilliseconds() command which is equivalent to Windows GetTickCount_()
Image Image
Post Reply