[comp.lang.c++] Zortech and 3rd party libraries

bright@Data-IO.COM (Walter Bright) (01/04/89)

In article <4800048@m.cs.uiuc.edu> rchen@m.cs.uiuc.edu writes:
<I wish Zortech could generate (as an option) Turbo C compatible object code
<so I can link it with my Turbo C graphics libraries.  I consider it as a great
<drawback that Zortech is incompatible with any of the existing well known
<C compilers on MS-DOS.  Zortech is a good choice if you want to learn C++
<but it is too primitive to do anything real.

Lots of people don't understand why they can't link libraries intended for
compiler x with code generated from compiler y. The problems are:

1. The compiler 'helper' functions (like floating point, long divide, etc.)
   are different.
2. The 3rd party libraries frequently use undocumented internal compiler
   library functions (the printf formatting routine is a popular example).
3. The 3rd party library makes use of nonstandard obscure functions that
   are peculiar to a specific compiler.
4. The 3rd party library was compiled with a different set of .h files,
   thus making things like the layout of the stdio _iob[] struct different.
5. You get my drift.

To be 100% compatible requires exactly copying someone else's library.
Obviously, this is stealing. The closer you match somebody else, the
more you risk being sued. It's a fine line.

Most of these 3rd party libraries can be made compatible with Zortech C
simply by recompiling them. If you don't have the source, give the vendor
a call and say you want a Zortech C version. Let them know it's worth
their while, they're probably not reading usenet.

If you really gotta have absolute MSC or TC compatibility, you need to
buy those products, not something else. One of the reasons I wrote my
own compiler is because I wanted to do it my way, not Phillipe's or Bill's.

As far as it being 'too primitive to do anything real', you need to be
more specific. The compiler has been in use for years for lots
of 'real' projects (including itself!). Perhaps your idea of a 'real'
project is different from mine.

** Turn up the volume, and rip off the knob! **

usenet@cps3xx.UUCP (Usenet file owner) (01/04/89)

in article <1800@dataio.Data-IO.COM>, bright@Data-IO.COM (Walter Bright) says:
> In article <4800048@m.cs.uiuc.edu> rchen@m.cs.uiuc.edu writes:
> <drawback that Zortech is incompatible with any of the existing well known
> <C compilers on MS-DOS.  Zortech is a good choice if you want to learn C++
> <but it is too primitive to do anything real.
> 
> As far as it being 'too primitive to do anything real', you need to be
> more specific. The compiler has been in use for years for lots
> of 'real' projects (including itself!). Perhaps your idea of a 'real'
> project is different from mine.

I haven't found it to be 'too primitive'. I used to use Aztec C as my
favorite C. I've never been a fan of Borland's C, although I've had
extensive experience with it professionally. I bought Zortech for my use
at home. I've compiled both MicroEmacs v3.9e and Xlisp v2.0 under both
Turbo C v1.5 and Zortech C++ v1.03. In both cases Zortech compiled
faster ( no optimization) than Turbo. The resulting executable was 
about 10K larger in both cases from Zortech, I assume this is from
library routines. The Zortech optimizer is better than anything I've seen
for code optimization for MS-DOS.

The only criticism I can come up with is it would be nice if ztc would 
look for the linker as name blink and then if that is not found search
for link. I have my machine set up with uSoft's linker named mslink and
the zortech linker called link.

John H. Lawitzke      UUCP: ...rutgers!mailrus!frith!fciiho!jhl
Michigan Farm Bureau        ...decvax!purdue!mailrus!frith!fciiho!jhl
Insurance Group             ...uunet!frith!jhl
"My other computer is an IBM RT Model 135"

maxsmith@athena.mit.edu (Samuel M Druker) (01/05/89)

Newer releases of the Zortech C++ compiler have resolved the linker name
conflict in exactly that fashion.


==============================================================================
Samuel Druker			|	ARPA: maxsmith@athena.mit.edu
Zortech, Inc.           	|	Bix: maxsmith
Arlington, MA           	|	"Basically, my boss doesn't even
    				|	  *know* I'm on the net."

hardin@hpindda.HP.COM (John Hardin) (01/06/89)

>The only criticism I can come up with is it would be nice if ztc would 
>look for the linker as name blink and then if that is not found search
>for link. I have my machine set up with uSoft's linker named mslink and
>the zortech linker called link.
>
>John H. Lawitzke      
>----------

I agree! I don't like being required to rename files in other products
to get a new product on my system to work properly.  If you work with
Zortech and MS products on the same system this need to rename link
is a pain.  The suggestion John makes above would please me as well.
(W.B., are you listening? :-) )

John Hardin
hardin%hpindda@hplabs.hp.com
----------

brevard@mcc.com (Laurence Brevard) (01/07/89)

In article <6170003@hpindda.HP.COM>, hardin@hpindda (John Hardin) writes:
>...
>>I have my machine set up with uSoft's linker named mslink and
>>the zortech linker called link.
>>
>>John H. Lawitzke      
>
>I agree! I don't like being required to rename files in other products
>to get a new product on my system to work properly.  If you work with
>Zortech and MS products on the same system this need to rename link
>is a pain.    The suggestion John makes above would please me as well.
>(W.B., are you listening? :-) )>

I think that Zortech's BLINK should be named BLINK instead of LINK and
that ZTC should look for BLINK instead of LINK.  Rumor has it that in
the newest version that is the case.

Meanwhile... all you have to do to "fix" it is, when running Zortech,
put \zortech\bin ahead of \dos in your search PATH (assuming those are
the locations of bLINK and msLINK respectively).

I use a "GODO.BAT" routine to execute things like word processors and
language systems.  The syntax is:

GODO DISK DIRECTORY NAME ARG1 ARG2 ...

For example Z.BAT contains two lines...

    @echo off
    GODO E: \ZORTECH\BIN ZED %1 %2

GODO does a default PATH setup (via CALL SETPATH -- I use MSDOS 3.3
which can call .bat files) then puts the home directory for the
program of interest in front of the default path via:

    PATH %1%2;%path%

Cheers (I still think BLINK should have been named BLINK!  :-)
Laurence Brevard   3500 W.Balcones Center Dr, Austin,TX 78759   [512] 338-3567
ARPA: brevard@mcc.com          UUCP: ...!cs.utexas.edu!milano!cadillac!brevard
Microelectronics and Computer Technology Corporation (MCC)    VLSI CAD Program

wilker@batcomputer.tn.cornell.edu (Clarence W. Wilkerson Jr.) (01/07/89)

I haven't tried this, but I don't see why one could not just patch
all the references in the Zortech files to "BLNK" or some such
non-usual name.