[comp.windows.ms.programmer] Zortech C++ and the MSC /NT flag.

mguyott@eriador.prime.com (02/16/91)

I am currently using Zortech C++ Version 2.18 to develop a Windows
application.  I've been able to successfully compile and link a test
program.  I am getting ready to begin development of parts of our
application.  I have one question that I am hoping someone out there
will be able to answer for me.  How do you get different modules to
compile into different code segments using the Zortech C++ compiler?

I know that you would use the /NT flag with MSC.  I also am aware that
you have to list the segments in the applications .def file.  When you
are using the Zortech C++ compiler is it sufficient to just list the
segments in the .def file or is there some Zortech C++ compiler flag
that is not documented that needs to be specified.

Except for this one problem thing have worked well with Zortech C++
V2.18 so far.  Thanks for any help.                         Marc
----
Two of the worst things we teach our children are that a knowledge of science
is nice but not necessary, and a knowledge of sex is necessary but not nice.

Marc Guyott              Constellation Software, Inc.          (508) 620-2800
                         Framingham, Mass. 01701 USA                Ext. 3135
mguyott@primerd.prime.com       ...!{uunet, decwrl}!primerd.prime.com!mguyott

mguyott@eriador.prime.com (02/16/91)

An update on the state of my original question/problem.  After looking
at the .map file for a Windows application built using Zortech C++ I
have seen that Zortech C++ puts each .cpp file it compiles into it's
own code segment.  This solves half of my problem in that each module
now goes into it's own code segment.  The other, unsolved, half of my
problem is how do I combine several small code modules (separate .cpp
files) into one code segment?  Because they have different module names
they are automatically put into different code segments by the linker.
One way to solve this is to put everything in one code module but this
takes away from the idea of one class in one file.  So I guess I'm back
to my original question: "Is there a way to tell the Zortech C++ compiler
the name of the code segment to put this object code into?"  Marc
----
Two of the worst things we teach our children are that a knowledge of science
is nice but not necessary, and a knowledge of sex is necessary but not nice.

Marc Guyott              Constellation Software, Inc.          (508) 620-2800
                         Framingham, Mass. 01701 USA                Ext. 3135
mguyott@primerd.prime.com       ...!{uunet, decwrl}!primerd.prime.com!mguyott

bright@nazgul.UUCP (Walter Bright) (02/26/91)

In article <149000001@eriador> mguyott@eriador.prime.com writes:
/I am currently using Zortech C++ Version 2.18 to develop a Windows
/application.
/How do you get different modules to
/compile into different code segments using the Zortech C++ compiler?

Two solutions:
1. Use the M or L memory models, so that each module gets its own code
   segment name.
2. There should be a utility in your \zortech\bin directory called PATCHOBJ.
   That utility can be used to change the segment names in an existing .OBJ
   file. If you run the program without arguments, it will present directions
   on how to use it.