Question RE: developing cross-platform applications

Question RE: developing cross-platform applications

Post by Cedric Teff » Sun, 07 Nov 1999 04:00:00



Greetings, Master Coders --

I'm about to embark on a software development project in which I will be
developing an application which I want to run on several different
operating platforms (initially just *NIX variants and MS-Windows, but
eventually others -- maybe BeOs; MacOS, etc.).  It will be a network
service (think POP mail or LDAP server) so user interface issues aren't
my main concern.  What I am worried about are what I would call the
"basics": endianness, word size, how to do basic disk i/o, etc.

So as a "for instance", something as simple as an integer variable means
very different things on various systems.  Is my int a 32-bit int or a
64-bit int?  Is it big-endian, or little-endian? The answer depends on
your platform.  I obviously want to write the core code for my app in
such a way that I can get exactly what I need on all platforms without
actually rewriting the entire application for each platform.

Now I could probably work out some system of #ifdef's and #define's to
do a lot of this, but if somebody has worked a lot of this out I'd
rather not re-invent the wheel.

I am wondering if anybody out there could recommend a book or article or
web page or something that gives practical, concrete solutions to these
problems.

Oh, and before somebody suggests I just write the thing in Java -- I've
considered that, but for various reasons I'm sticking with C/C++.

Thanks in advance,

- Cedric

 
 
 

1. Question about developing cross-platform apps

Greetings, Master Coders --

I'm about to embark on a software development project in which I will be

developing an application which I want to run on several different
operating platforms (initially just *NIX variants and MS-Windows, but
eventually others -- maybe BeOs; MacOS, etc.).  It will be a network
service (think POP mail or LDAP server) so user interface issues aren't
my main concern.  What I am worried about are what I would call the
"basics": endianness, word size, how to do basic disk i/o, etc.

So as a "for instance", something as simple as an integer variable means

very different things on various systems.  Is my int a 32-bit int or a
64-bit int?  Is it big-endian, or little-endian? The answer depends on
your platform.  I obviously want to write the core code for my app in
such a way that I can get exactly what I need on all platforms without
actually rewriting the entire application for each platform.

Now I could probably work out some system of #ifdef's and #define's to
do a lot of this, but if somebody has worked a lot of this out I'd
rather not re-invent the wheel.

I am wondering if anybody out there could recommend a book or article or

web page or something that gives practical, concrete solutions to these
problems.

Oh, and before somebody suggests I just write the thing in Java -- I've
considered that, but for various reasons I'm sticking with C/C++.

Thanks in advance,

- Cedric

P.S. - Sorry if this is a repost.  My ISP's news server isn't
cooperating.

2. TCP socket question on AIX

3. Which API is the best for developing cross platform C++ applications

4. 3D support in video card?

5. Unix/Windows Cross-platform Question

6. ISA Plug and Play (Pray)

7. Cross platform application

8. LILO booting an OS from extended partition?

9. Cross-Platform Wav C library?

10. wxWindows 2.4.1 for cross-platform GUI apps

11. Announce: lib3d-0.1.7 - Fast, Free, Cross-platform 3d

12. Cross-platform Calendar Manager?

13. REVOLUTION CROSS-PLATFORM IDE LAUNCHED