⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cplibr.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 3 页
字号:
.chap *refid=cplibr The &product Libraries
.*
.np
.ix 'libraries'
The &product library routines are described in the
.book &company C Library Reference
manual, and the
.book &company C++ Class Library Reference
manual.
.if '&target' eq 'QNX' .do begin
.*
.section &product Library Directory Structure
.*
.np
.ix 'libraries' 'location'
The &product libraries are located under the
.fi &pathnam&libdir
directory.
.millust begin
                        /usr
                          |
             ---.---------+---------.---
                |                   |
               lib               include
                |                   |
.millust end
.do end
.el .do begin
.*
.section &product Library Directory Structure
.*
.np
.ix 'libraries' 'directory structure'
Since &product supports both 16-bit and 32-bit application
development, libraries are grouped under two major subdirectories.
The
.fi LIB286
directory is used to contain libraries for 16-bit application
development.
The
.fi LIB386
directory is used to contain libraries for 32-bit application
development.
.np
For 16-bit application development, the Intel x86 processor-dependent
libraries are placed under the
.fi &pathnamup&pc.LIB286
directory.
.np
For 32-bit application development, the Intel 386 and
upward-compatible processor-dependent libraries are placed under the
.fi &pathnamup&pc.LIB386
directory.
.np
Since &product also supports several operating systems, including
DOS, OS/2, Windows 3.x and Windows NT, system-dependent libraries are
grouped under different directories underneath the processor-dependent
directories.
.np
.ix 'DOS subdirectory'
For DOS applications, the system-dependent libraries are placed in
.fi &pathnamup\LIB286\DOS
(16-bit applications) and
.fi &pathnamup\LIB386\DOS
(32-bit applications).
.np
.ix 'OS2 subdirectory'
For OS/2 applications, the system-dependent libraries are
placed in
.fi &pathnamup\LIB286\OS2
(16-bit applications) and
.fi &pathnamup\LIB386\OS2
(32-bit applications).
.np
.ix 'WIN subdirectory'
For Microsoft Windows applications, the system-dependent libraries are
placed in
.fi &pathnamup\LIB286\WIN
(16-bit applications) and
.fi &pathnamup\LIB386\WIN
(32-bit applications).
.np
.ix 'NT subdirectory'
For Microsoft Windows NT applications, the system-dependent libraries
are placed in
.fi &pathnamup\LIB386\NT
(32-bit applications).
.np
.ix 'NETWARE subdirectory'
For Novell NetWare 386 applications, the system-dependent libraries
are placed in
.fi &pathnamup\LIB386\NETWARE
(32-bit applications).
.millust begin
                  &pathnam
                     |
         .-----------+----------------.
         |                            |
      lib286                       lib386
         |                            |
 .-------+-------.    .-------.-------+-------.-------.
 |       |       |    |       |       |       |       |
dos     os2     win  dos     os2     win      nt   netware
 |       |       |    |       |       |       |       |
.millust end
.do end
.* --------------------
.*
.section &product C Libraries
.*
.np
Due to the many code generation strategies possible in the 80x86
family of processors, a number of versions of the libraries are
provided.
You must use the libraries which coincide with the particular
.if '&target' ne 'QNX' .do begin
architecture, operating system, and
.do end
code generation strategy or model that you have selected.
For the type of code generation strategy or model that you intend to
use, refer to the description of the "m?" memory model compiler option.
The various code models supported by &product are described in the
chapters entitled :HDREF refid='mdl86'. and :HDREF refid='mdl386'..
.np
We have selected a simple naming convention for the libraries that are
provided with &product..
Letters are affixed to the file name to indicate the particular
strategy with which the modules in the library have been compiled.
.begnote 16-bit only
.ix 'C libraries' 'small'
.ix 'small model' 'libraries'
.mnote S
denotes a version of the &product libraries which have been compiled
for the "small" memory model (small code, small data).
.ix 'C libraries' 'medium'
.ix 'medium model' 'libraries'
.mnote M
denotes a version of the &product libraries which have been compiled
for the "medium" memory model (big code, small data).
.ix 'C libraries' 'compact'
.ix 'compact model' 'libraries'
.mnote C
denotes a version of the &product libraries which have been compiled
for the "compact" memory model (small code, big data).
.ix 'C libraries' 'large'
.ix 'large model' 'libraries'
.mnote L
denotes a version of the &product libraries which have been compiled
for the "large" memory model (big code, big data).
.ix 'C libraries' 'huge'
.ix 'huge model' 'libraries'
.mnote H
denotes a version of the &product libraries which have been compiled
for the "huge" memory model (big code, huge data).
.if '&target' ne 'QNX' .do begin
.mnote MT
denotes a version of the &product libraries which may be used with
OS/2 multi-threaded applications.
.mnote DL
denotes a version of the &product libraries which may be used when
creating an OS/2 Dynamic Link Library.
.do end
.endnote
.begnote 32-bit only
.ix '&lang libraries' 'flat'
.ix 'flat model' 'libraries'
.ix '&lang libraries' 'small'
.ix 'small model' 'libraries'
.mnote 3R
denotes a version of the &product libraries that will be used by
programs which have been compiled for the "flat/small" memory models
using the "3r", "4r" or "5r" option.
.mnote 3S
denotes a version of the &product libraries that will be used by
programs which have been compiled for the "flat/small" memory models
using the "3s", "4s" or "5s" option.
.endnote
.* WCC ---------------------------------------------------------
.np
.if '&target' eq 'DOS' .do begin
The &product 16-bit libraries are listed below by directory.
.np
.cp 8
.us Under
.fi &pathnamup\LIB286\DOS
.ix 'CLIBS.LIB'
.ix 'CLIBM.LIB'
.ix 'CLIBC.LIB'
.ix 'CLIBL.LIB'
.ix 'CLIBH.LIB'
.ix 'GRAPH.LIB'
.millust begin
CLIBS.LIB    (DOS small model support)
CLIBM.LIB    (DOS medium model support)
CLIBC.LIB    (DOS compact model support)
CLIBL.LIB    (DOS large model support)
CLIBH.LIB    (DOS huge model support)
GRAPH.LIB    (model independent, DOS graphics support)
.millust end
.np
.cp 13
.us Under
.fi &pathnamup\LIB286\OS2
.ix 'CLIBMTL.LIB'
.ix 'CLIBDLL.LIB'
.ix 'DOSPMS.LIB'
.ix 'DOSPMM.LIB'
.ix 'DOSPMC.LIB'
.ix 'DOSPML.LIB'
.ix 'DOSPMH.LIB'
.millust begin
CLIBS.LIB    (OS/2 small model support)
CLIBM.LIB    (OS/2 medium model support)
CLIBC.LIB    (OS/2 compact model support)
CLIBL.LIB    (OS/2 large model support)
CLIBH.LIB    (OS/2 huge model support)
CLIBMTL.LIB  (OS/2 multi-thread, large model support)
CLIBDLL.LIB  (OS/2 DLL, large model support)
DOSPMS.LIB   (Phar Lap 286 PM small model support)
DOSPMM.LIB   (Phar Lap 286 PM medium model support)
DOSPMC.LIB   (Phar Lap 286 PM compact model support)
DOSPML.LIB   (Phar Lap 286 PM large model support)
DOSPMH.LIB   (Phar Lap 286 PM huge model support)
.millust end
.np
.cp 8
.us Under
.fi &pathnamup\LIB286\WIN
.ix 'CLIBS.LIB'
.ix 'CLIBM.LIB'
.ix 'CLIBC.LIB'
.ix 'CLIBL.LIB'
.ix 'WINDOWS.LIB'
.ix 'Windows SDK' 'Microsoft'
.millust begin
CLIBS.LIB    (Windows small model support)
CLIBM.LIB    (Windows medium model support)
CLIBC.LIB    (Windows compact model support)
CLIBL.LIB    (Windows large model support)
WINDOWS.LIB  (Windows API library)
.millust end
.do end
.el .if '&target' eq 'QNX' .do begin
The &product 16-bit libraries are listed below.
.ix 'clibs.lib'
.ix 'clibm.lib'
.ix 'clibc.lib'
.ix 'clibl.lib'
.ix 'clibh.lib'
.millust begin
clibs.lib    (small model support)
clibm.lib    (medium model support)
clibc.lib    (compact model support)
clibl.lib    (large model support)
clibh.lib    (huge model support)
.millust end
.do end
.* WCC386 ------------------------------------------------------
.if '&target' eq 'QNX' .do begin
The &product 32-bit libraries are listed below.
.ix 'clib3r.lib'
.ix 'clib3s.lib'
.millust begin
clib3r.lib   (flat/small models, "3r", "4r" or "5r" option)
clib3s.lib   (flat/small models, "3s", "4s" or "5s" option)
.millust end
.do end
.el .if '&target' eq 'DOS' .do begin
The &product 32-bit libraries are listed below by directory.
.np
.cp 8
.us Under
.fi &pathnamup\LIB386\DOS
.ix 'CLIB3R.LIB'
.ix 'CLIB3S.LIB'
.ix 'GRAPH.LIB'
.millust begin
CLIB3R.LIB   (flat/small models, "3r", "4r" or "5r" option)
CLIB3S.LIB   (flat/small models, "3s", "4s" or "5s" option)
GRAPH.LIB    (flat/small models, DOS graphics support)
.millust end
.pc
The graphics library
.fi GRAPH.LIB
is independent of the argument passing conventions.
.np
.cp 8
.us Under
.fi &pathnamup\LIB386\OS2
.ix 'CLIB3R.LIB'
.ix 'CLIB3S.LIB'
.millust begin
CLIB3R.LIB   (flat/small models, "3r", "4r" or "5r" option)
CLIB3S.LIB   (flat/small models, "3s", "4s" or "5s" option)
.millust end
.np
.cp 8
.us Under
.fi &pathnamup\LIB386\WIN
.ix 'CLIB3R.LIB'
.ix 'CLIB3S.LIB'
.ix 'WIN386.LIB'
.ix 'Windows SDK' 'Microsoft'
.millust begin
CLIB3R.LIB   (flat/small models, "3r", "4r" or "5r" option)
CLIB3S.LIB   (flat/small models, "3s", "4s" or "5s" option)
WIN386.LIB   (32-bit Windows API)
.millust end
.np
.cp 8
.us Under
.fi &pathnamup\LIB386\NT
.ix 'CLIB3R.LIB'
.ix 'CLIB3S.LIB'
.millust begin
CLIB3R.LIB   (flat/small models, "3r", "4r" or "5r" option)
CLIB3S.LIB   (flat/small models, "3s", "4s" or "5s" option)
.millust end
.do end
.*
.if '&target' eq 'QNX' .do begin
.*
.section &cmpcname 16-bit Shared Library
.*
.np
.ix 'shared library'
A portion of the 16-bit &cmpcname Library is also stored in a
memory-resident library called the system
.us shared library.
On multi-tasking systems, it makes sense that commonly-used library
routines such as
.us read
and
.us write
be shared among processes.
By sharing the same code, the memory requirement for applications is
reduced.
The functions in the shared library are memory model independent so
they can be used by any small/large code, small/large/huge data
applications.
:cmt. .np
:cmt. .ix '_NO_SLIB'
:cmt. If the
:cmt. .kwm _NO_SLIB
:cmt. macro is
:cmt. .us not
:cmt. defined before header files are included when compiling a C source
:cmt. file, then the shared library version of a function is called directly
:cmt. (provided that the function is in the shared library).
:cmt. Not all the functions in the C library have been placed in the shared
:cmt. library, but many of the commonly-used functions are to be found
:cmt. there.
:cmt. By default, your application will use shared library functions.
:cmt. .np
:cmt. If the
:cmt. .kwm _NO_SLIB
:cmt. macro is defined before header files are included, then a direct
:cmt. reference is made to the function being invoked.
:cmt. Also, if the address of a shared library function (e.g.,
:cmt. .us &read
:cmt. .ct )
:cmt. is requested by the application, then a direct reference has been
:cmt. made.
:cmt. Normally, this results in the actual code for the routine being
:cmt. included in the executable image (a non-shared copy).
:cmt. However, if you wish to use the routines in the shared library,
:cmt. interface libraries for each memory model are provided.
:cmt. For example, the interface routine for
:cmt. .us read
:cmt. calls the actual
:cmt. .us read
:cmt. function in the shared library.
:cmt. The &product shared-library interface libraries are listed below.
:cmt. .ix 'stubs.lib'
:cmt. .ix 'stubm.lib'
:cmt. .ix 'stubc.lib'
:cmt. .ix 'stubl.lib'
:cmt. .ix 'stubh.lib'
:cmt. .millust begin
:cmt. stubs.lib    (small model support)
:cmt. stubm.lib    (medium model support)
:cmt. stubc.lib    (compact model support)
:cmt. stubl.lib    (large model support)
:cmt. stubh.lib    (huge model support)
:cmt. .millust end
:cmt. .np
:cmt. .kw cc
:cmt. defines
:cmt. .kwm _NO_SLIB
:cmt. if any of the
:cmt. .sy &sw.g,
:cmt. .sy &sw.Ci
:cmt. or
:cmt. .sy &sw.Cn
:cmt. options are used.
:cmt. .kw cc
:cmt. causes the linker,
:cmt. .kw wlink,
:cmt. to search the appropriate
:cmt. .fi stub?.lib
:cmt. if any of the
:cmt. .sy &sw.Cd
:cmt. or
:cmt. .sy &sw.Ci
:cmt. options are used.
.do end
.*
.section &product Class Libraries

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -