C/C++ cross-platform compatibility 
Author Message
 C/C++ cross-platform compatibility

I'm working on an application I want to compile on many
different platforms.  Somewhere along the line, I need to
obtain a list of all files in a directory.  In OS/2, DOS,
WinNT, etc... the way to do this is with DosFindFirst and
DosFindNext.  However, these are not part of the ANSI
standard, so I want to know, what should I use?  Are these
actually supported on everything, or is there another way
to do this?
--------------------------



Fri, 21 Aug 1998 03:00:00 GMT  
 C/C++ cross-platform compatibility

Quote:

> I'm working on an application I want to compile on many
> different platforms.  Somewhere along the line, I need to
> obtain a list of all files in a directory.  In OS/2, DOS,
> WinNT, etc... the way to do this is with DosFindFirst and
> DosFindNext.  However, these are not part of the ANSI
> standard, so I want to know, what should I use?  Are these
> actually supported on everything, or is there another way
> to do this?

  I'm not a pro but I do believe this is an OS specific problem
that can't be solved by any current ANSI standard function.

regards,
H.Cross



Fri, 21 Aug 1998 03:00:00 GMT  
 C/C++ cross-platform compatibility
: I'm working on an application I want to compile on many
: different platforms.  Somewhere along the line, I need to
: obtain a list of all files in a directory.  In OS/2, DOS,
: WinNT, etc... the way to do this is with DosFindFirst and
: DosFindNext.  However, these are not part of the ANSI
: standard, so I want to know, what should I use?  Are these
: actually supported on everything, or is there another way
: to do this?
: --------------------------

--

Routines related to files and directories (iostreams or the C
stream functions excluded) are not usually portable across platforms.  If
it were me, I'd use the POSIX extensions for directory functions where
available.  I'd use #ifdefs to add code for platforms that aren't POSIX
compliant.

Laura Michaels

http://members.aol.com/lauram3017/index.html



Mon, 24 Aug 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. slightly OT: cross-platform binary compatibility?

2. Newbie: separate big .cs file into small .cs files

3. C/C++ Cross-platform *text-based* API

4. Where can find information for programming cross-platform in c++

5. Cross-platform Mac/Win C++ with QTVR and MFC

6. eVC 4.0 vs. eVC 3.0 - platform compatibility

7. High-performance, cross-platform string support

8. Cross-Platform Development in C

9. cross platform byte storage

10. Regarding chapter 22 Cross platform development of C Unleashed

11. Cross platform development strategy

 

 
Powered by phpBB® Forum Software