T.R | Title | User | Personal Name | Date | Lines |
---|
2071.1 | $ CC/DEFINE=(__VMS_VER=60100000) | HYDRA::NEWMAN | Chuck Newman, 508/467-5499 (DTN 297), MRO1-3/F26 | Mon Jan 27 1997 13:32 | 0 |
2071.2 | already tried | CPEEDY::PRINDLE | | Mon Jan 27 1997 13:51 | 10 |
|
We have defined the __VMS_VER macro but it does not help with the DECC$SHR
image. Only works with the .H files checking the running VMS version via
the __VMS_VER macro
thanks,
Wayne
|
2071.3 | How To Back-Compile With DEC C... | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Mon Jan 27 1997 14:10 | 28 |
|
I was able to get all this to work through several steps -- they
are mentioned elsewhere in this conference, but I'll repost a
synopsis here:
First, CC/DECC/DEFINE=__VMS_VERS... to the expected value, when
compiling. (This gets the correct header files...)
Then DEFINE/USER DECC$SHR just before the compilation, using a
version of the DECC$SHR from the target version of OpenVMS.
The DECC$SHR requirement gets a little more interesting when the
SQLPRE tool is in use, which is the reason I requested a compiler
switch be added the specification of the target DECC$SHR image.
I do have a creative (ugly?) way to issue the needed DEFINE/USER
command just before SQLPRE invokes DEC C: where SQLPRE wants a
"CC" symbol, specify the name of a command procedure. (Here's
the ugly part: since SQLPRE invokes the compiler symbol with some
qualifiers, one must specify a bogus parameter on the invocation,
and ignore it (reading P2 through P8 into the "real" CC command)
inside the command procedure:
$ CC == "@command nla0:"
The above gets DCL to accept qualifers as parameters, and not as
qualifiers for the "@" operator.) The procedure can invoke the
DEFINE/USER just before the compilation.
|
2071.4 | are you sure all the stuff was compiled with 60100000? | TAVENG::BORIS | Boris Gubenko, ISE | Mon Jan 27 1997 16:46 | 38 |
|
%LINK-W-NUDFSYMS, 3 undefined symbols:
%LINK-I-UDFSYM, DECC$$GA___CTYPET
%LINK-I-UDFSYM, DECC$$GL___CTYPEA
%LINK-I-UDFSYM, DECC$$GL___ISCLOCALE
I wonder how these symbols became visible if all the stuff was compiled with
/define=(__VMS_VER=60100000).
The only header declaring these symbols is <ctype.h> and the declarations
are protected with __VMS_VER >= 60200000 condition, as follows:
/******************************************************************************
**
** OpenVMS V6.2 and later
**
******************************************************************************/
#if __VMS_VER >= 60200000
# define __ctypet (*decc$$ga___ctypet)
# define __ctypea (decc$$gl___ctypea)
# define __isclocale (decc$$gl___isclocale)
The only header making inclusion to <ctype.h> is <wctype.h> which is totally
protected with __VMS_VER >= 60200000 (this header was introduced in
OpenVMS V6.2). No header makes #include to <wctype.h>.
I compiled the program below on OpenVMS V6.2 with DECC V5.2 with
/define=(__VMS_VER=60100000) and the object file produced could be
linked on OpenVMS V6.1 without any problem.
#include <ctype.h>
main() { int i = isprint('a'); }
Could you verify, please, that the module(s) making inclusion to <ctype.h>
or <wctype.h> are compiled with __VMS_VER=60100000 ?
Boris
|
2071.5 | We missed some C++ code | CPEEDY::PRINDLE | | Mon Jan 27 1997 17:30 | 15 |
| Boris,
Your right. We missed some C++ code that did not have the /define=
on it.
Is there any problem with compiling against the 6.2 decc$shr and linking
against the 6.1 decc$shr. The share should only have new stuff added which
we did bump heads with but was able to resolve with /preifx=except=getopt
it our case.
Thanks,
Wayne
|
2071.6 | compiling against 6.2 and linking against 6.1 | TAVENG::BORIS | Boris Gubenko, ISE | Tue Jan 28 1997 04:59 | 24 |
|
> Is there any problem with compiling against the 6.2 decc$shr and linking
> against the 6.1 decc$shr.
Not that I know of if the correct definitions were picked up from the
headers by the compiler.
> The share should only have new stuff added which
> we did bump heads with but was able to resolve with /preifx=except=getopt
> it our case.
A lot of new DEC C RTL functions were introduced in OpenVMS V6.2 and all of
them are listed in the DEC C RTL entries table. getopt() is an example. As
far as I understand, your application contains an identifier named getopt,
perhaps, a function. You should prevent prefixing of such names by the
compiler using the /preifx=(all,except=(...,...)) qualifier as you did for
the getopt.
Note, that to be prefixed by the compiler, an identifier does not need to be
a function. Any identifier with external linkage mentioned in the DEC C
RTL entries table gets prefixed. See note 1991 in this conference, for
example, for more details.
Boris
|