Subj : Multi-platform EXE? To : Jonathan de Boyne Pollard From : George White Date : Sun Sep 16 2001 05:14 am Hi Jonathan, On 13-Sep-01, Jonathan de Boyne Pollard wrote to Don Guy: DG>> LOADDSKF.EXE appears to run as a native process, regardless of DG>> whether it is launched from a DOS or and OS/2 command prompt. Is DG>> it possible to duplicate this with Borland C++ 1.0? JdBP> Yes, in two ways: No, you can't - as asked! You can however use BC 3.1 for the DOS part and BCOS/2 for the OS/2 part under your option two. JdBP> The first requires the OS/2 1.x Developers' Toolkit (as I JdBP> recall). You BIND a DOS stub loader program and family API JdBP> library onto the OS/2 program. The stub loader program, when JdBP> executed, loads the executable proper into memory, binding the JdBP> calls to the OS/2 system API to the family API library, which JdBP> translates them into DOS system API calls LOADDSLF doesn't use this method. JdBP> The second involves linking two separate programs, one for DOS JdBP> and one for OS/2, and using the former as the stub executable in JdBP> the latter This is the way LOADDSKF works. It has totally separate executables for DOS and OS/2. JdBP> In either case you'll need a replacement for Borland's C JdBP> library, of course. You won't be able to use the one that JdBP> Borland supplies, since that uses the DOS system API and not the JdBP> Family API. Many years ago, because I didn't have the OS/2 1.x JdBP> Developers' Toolkit, I wrote a replacement 16-bit library that JdBP> used the Family API, which I used, in combination with Borland JdBP> C++ 3.x for DOS and a Family API to DOS API shim library that I JdBP> wrote, to create version 1.0 of my Command Line Utilites. I JdBP> never released the C library to the general public, because JdBP> Borland came out with a proper 32-bit Borland C++ for OS/2 and JdBP> it was no longer worth the time and the effort to do so. (I did JdBP> release the Family API library that I wrote.) No, for the second method you need the two compilers, 16 bit DOS and 32 bit OS/2, you only need your method for using a 16 bit DOS compiler to produce native OS/2 .EXE files. JdBP> Why do you want to create a bound executable anyway ? I urge JdBP> you to not encourage the continued use of DOS by making more DOS JdBP> programs. Encourage the use of OS/2 instead. Make a native JdBP> OS/2 program and have done with it Good question... :-) George --- Terminate 5.00/Pro * Origin: A country point under OS/2 (2:257/609.6) .