1753283 Members
5207 Online
108792 Solutions
New Discussion юеВ

CXX usage

 
Mulder_1
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 ?

thanks
4 REPLIES 4
Steven Schweda
Honored Contributor

Re: CXX usage

> Which header is to be called ?

lib$routines.h

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
"DECC_INCLUDE" = "SYS$COMMON:[DECC$LIB.REFERENCE.DECC$RTLDEF]" (LNM$SYSTEM_TABLE)
= "SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C]"

ALP $ search decc_include:*.h LIB$DAY_OF_WEEK

******************************
SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C]LIB$ROUTINES.H;11

/* 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).
x2084
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=".
Hoff
Honored Contributor

Re: CXX usage

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

http://mvb.saic.com/freeware/freewarev70/libext/

As for examples of calling routines from C:

http://www.eight-cubed.com/examples.shtml

Google finds piles of stuff for the following query:

http://www.google.com/search?hl=en&q=lib+day_of_week+example