CXX usage

Frequent Advisor

CXX usage

Can anyone please tell me how to use LIB$DAY_OF_WEEK in Dec CXX ?

Which header is to be called ?

Steven Schweda
Honored Contributor

Re: CXX usage

> Which header is to be called ?


If you've extracted the header files from the
text libraries (which libraries are what the
compilers actually use), as was done in the
old days, you can SEARCH them.

I define a logical name:

ALP $ show logical decc_include

ALP $ search decc_include:*.h LIB$DAY_OF_WEEK


#define lib$day_of_week LIB$DAY_OF_WEEK
unsigned int lib$day_of_week(
unsigned int lib$day_of_week(__unknown_params);

I believe that nowadays the compiler
installation procedure does not give you the
option of extracting these "reference" header
files, so I wrote a command procedure to do
the LIBRARY /EXTRACT operations needed.

> [...] how to use [...]

Re-inquire if this remains a mystery (after
reading the LIB$ manual).
Trusted Contributor

Re: CXX usage

$ pipe libr sys$share:sys$starlet_c.tlb extr=* /out=sys$output /log |search sys$input "%librar-s-extracted", lib$day_of_week |search
sys$input lib$day_of_week /wind=(0,1)
Steven Schweda
Honored Contributor

Re: CXX usage

> $ pipe [...]

Well, yes, but then, if you wish to look at
the argument list, or some other context,
you're still stuck. I find it much more
convenient to have the loose files lying
around somewhere. Seems to me to be a good
trade-off between disk space and CPU work.

And that's "/extr=".
Honored Contributor

Re: CXX usage

LIBEXT is the tool that the older C installations used to perform a wildcard library extraction on various boxes.

As for examples of calling routines from C:

Google finds piles of stuff for the following query: