avo@gpu.utcs.utoronto.ca (A. Bashir) (11/05/90)
Hi everybody: I've been trying to use both Zortech C++ 2.0 and Turbo C++ 1.0 with MS Windows SDK but with not much success. The following is a description of how far I got. A - Zortech C++ 2.0: The simple test programs I tried, compiled and ran fine (include files and libraries were the MS ones). Once I introduced floating point numbers which required resolving some 'compiler helper functions' and floating point libraries with the Zortech 'zls.lib' library file, I started to get "C run time error message". B - Turbo C++ 1.0: TC++ does not seem to produce the right object files. The MS linker gives a warning that "The program does not have a starting address". Did anybody out there have any success? Any comments, suggestions and hints will be greatly appreciated. I will post a summary of the responses in this newsgroup. Thanks in advance, Avo avo@gpu.utcs.utoronto.ca avo@gpu.utcs.toronto.edu avo@utorgpu.uucp Tel:(416)-967-3516
bright@nazgul.UUCP (Walter Bright) (11/09/90)
In article <1990Nov5.062543.10383@gpu.utcs.utoronto.ca> avo@gpu.utcs.utoronto.ca (A. Bashir) writes:
<A - Zortech C++ 2.0:
<The simple test programs I tried, compiled and ran fine (include files and
<libraries were the MS ones). Once I introduced floating point numbers which
<required resolving some 'compiler helper functions' and floating point libraries
<with the Zortech 'zls.lib' library file, I started to get "C run time error
<message".
What command are you sending to the linker? The SDK libraries must be specified
first, followed by the Zortech libraries.
The trouble probably stems from the fact that MSC functions that return a double
actually return a pointer to a double. ZTC functions that return a double
return it in the registers AX,BX,CX,DX. Thus, if you are using the function
sin(), you will have pulled in the MSC one from the SDK libraries but
ZTC expects the return value to be in AX,BX,CX,DX, which it isn't.
The reverse problem can happen too.
This is not an ideal situation, and we are working to fix it.
bruce@hprpcd.HP.COM (Bruce Smith) (11/27/90)
# B - Turbo C++ 1.0: # # TC++ does not seem to produce the right object files. The MS linker gives a # warning that "The program does not have a starting address". Did anybody out # there have any success? Does no response to this note mean that noone else has tried using Turbo C++ with the Windows SDK? I know I failed at it. Any ideas? ...bruce
pmoore@hemel.bull.co.uk (Paul Moore) (11/28/90)
You are not going to be able to force a c(++) compiler to make windows code if the isn't an explicit "make windows code" switch in the compiler (as with MSC and Zortech 2.*). Windows code segments have very specific run in code at the front that windows modifies on the fly to allow the movement of segments. It is not just a matter of finding the right linkage parameters.
poffen@sj.ate.slb.com (Russ Poffenberger) (11/29/90)
In article <36200001@hprpcd.HP.COM> bruce@hprpcd.HP.COM (Bruce Smith) writes: ># B - Turbo C++ 1.0: ># ># TC++ does not seem to produce the right object files. The MS linker gives a ># warning that "The program does not have a starting address". Did anybody out ># there have any success? > >Does no response to this note mean that noone else has tried using Turbo C++ >with the Windows SDK? I know I failed at it. Any ideas? > I ahven't actually tried it but remember that the Windows calls expect the "Pascal" calling convention. (Look in windows.h. All the prototypes are "extern PASCAL xxxx") I am positive that TC cannot generate the proper code. Russ Poffenberger DOMAIN: poffen@sj.ate.slb.com Schlumberger Technologies UUCP: {uunet,decwrl,amdahl}!sjsca4!poffen 1601 Technology Drive CIS: 72401,276 San Jose, Ca. 95110 (408)437-5254