Quote
ta...@infos.de (Thomas Auer) wrote:
>We are writing a big database application with Sybase SQL Anywhere and
>till last week Delphi 1.0.
>Last wednesday I got Delphi 2.0 Client/Server and now we have the
>problem, that programs compiled with Delphi 2.0 don't run under Win
>3.11.
D2 has never been specified for Win 3.11.
Quote
>Our program must run under different OS, such as Win 3.11, 95, NT,
>OS/2. I can manage a Delphi 2.0 program to run under Win 3.11 when the
>newest version of Win 32S is also installed on that machine.
>If I save the source in Delphi 2.0 and want to recompile it under
>Delphi 1.02 for use under Win3.11/32S I get many errors because of
>some new features !!!!
>(TSession, ...... )
>Does anybody have any help for me ??
Write and test in Delphi 1 -- it is far more upward compatible than
backward compatible (in my experience so far).
Set up separate directories for the binaries, and set up separate project
files:
MyApp
myapp.dpr
myapp32.dpr
\win32
[all myapp32 dcu's and exe's and res will go here]
\win16
[all myapp16 dcu's and exe's and res will go here]
\src
main.dpr
Set the respective projects (in the Directories options page) to output to
the win32 or win16 directory. Put the win32 and win16 directories (as
applicable) first in the search path, followed by the src directory.
This will go a long way to acheiving compatibility. I set up a couple of
test projects like this, and it works reasonably well. You will have to
play with this a bit to get it working.
You can use conditional directives to isolate version specific code:
{$IF WIN32}
{ put Delphi 2/Win32 specific code in here }
{$ELSE}
{ put Delphi 1 /Windows specific code in here }
{$ENDIF}
Note that the old style strings are supposed to work the same in Delphi 2,
but I haven't tried this yet. Porting Delphi 2 string code back to Delphi 1
usually fails though, especially if you are calling API routines and such.
I should add as a P.S., that I am not endorsing the idea of dual platform
development, just explaining a way to deal with it, if you think it will
work.
--
Brad Aisa <ba...@hookup.net> web: http://www.hookup.net/~baisa/
1 Mises (M1.00) = 0.01 troy ounce gold; 1 Rand (1R) = 0.01 Mises
"The highest responsibility of philosophers is to serve as the
guardians and integrators of human knowledge." -- Ayn Rand