`
23号
  • 浏览: 133968 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

intro 3 for dev

阅读更多
INTRO(3)                  OpenBSD Programmer's Manual                 INTRO(3)

NAME
intro - introduction to the C libraries

SYNOPSIS
cc [flags] file ... [-llibrary]

DESCRIPTION
The manual pages in section 3 provide an overview of the C library func-
tions, their error returns, and other common definitions and concepts.
Most of these functions are available from the C library, libc. Other
libraries, such as the math library, libm, must be indicated at compile
time with the -l option of the compiler.

The various libraries (followed by the loader flag):

libc (-lc)
Standard C library functions. When using the C compiler cc(1),
it is not necessary to supply the loader flag -lc for these func-
tions. There are several ``libraries'' or groups of functions
included inside of libc: the standard I/O routines, database rou-
tines, bit operators, string operators, character tests and char-
acter operators, DES encryption routines, storage allocation,
time functions, signal handling, and more.

libcompat (-lcompat)
Functions which are obsolete but are available for compatibility
with 4.3BSD. In particular, a number of system call interfaces
provided in previous releases of BSD have been included for
source code compatibility. Use of these routines should, for the
most part, be avoided. The manual page entry for each compati-
bility routine indicates the proper interface to use.

libcrypto (-lcrypto)
The OpenSSL crypto library. Implements a range of cryptographic
algorithms, providing such functionality as symmetric encryption,
public key cryptography, and certificate handling. See
crypto(3).

libcurses (-lcurses)
libncurses (-lncurses)
libtermcap (-ltermcap)
libtermlib (-ltermlib)
Terminal-independent screen management routines for two-dimen-
sional non-bitmap display terminals. This implementation is
``new curses'' and is a replacement for 4.2BSD classic curses.
The libraries libncurses, libtermcap, and libtermlib are all hard
links to libcurses. This is for compatibility purposes only; new
programs should link with -lcurses. See curses(3) and
termcap(3).

libdes (-ldes)
Implementation of the DES encryption algorithm. See
des_crypt(3).

libedit (-ledit)
Generic line editing and history functions, similar to those
found in sh(1). Functions using the libedit library must be
linked with the libcurses library, i.e. -ledit -lcurses. See
editline(3).

libevent (-levent)
Provides a mechanism to execute a function when a specific event
on a file descriptor occurs or after a given time has passed.
See event(3).

libexpat (-lexpat)
Library routines for parsing XML documents.

libform (-lform)
Terminal-independent facilities for composing form screens on
character-cell terminals. Functions using the libform library
must be linked with the libcurses library, i.e. -lform -lcurses.
See form(3).

libfrtbegin (-lfrtbegin)
libg2c (-lg2c)
Support routines for Fortran functions. These two libraries were
separated to allow linking Fortran code with other languages on
ELF platforms. See g77(1).

libgcc (-lgcc)
GCC runtime support, including long arithmetic, propolice, and
language independent exception support. Note: users do not nor-
mally have to explicitly link with this library.

libgssapi (-lgssapi)
The Generic Security Service Application Program Interface
(GSS-API) provides security services to callers in a generic
fashion. See gssapi(3).

libiberty (-liberty)
Collection of subroutines missing in other operating systems, as
well as the C++ demangler and other functions used by the GNU
toolchain.

libkadm5clnt (-lkadm5clnt)
Kerberos administration client library, for talking to a Kerberos
database. Clients communicate via the network.

libkadm5srv (-lkadm5srv)
Kerberos administration server library, for talking to a Kerberos
database. Servers talk directly to the database.

libkeynote (-lkeynote)
System library for the keynote trust-management system. Trust-
management systems provide standard, general-purpose mechanisms
for specifying application security policies and credentials.
Functions using the libkeynote library must be linked with the
libm and libcrypto libraries, i.e. -lkeynote -lm -lcrypto. See
keynote(3) and keynote(4).

libkrb5 (-lkrb5)
libasn1 (-lasn1)
libcom_err (-lcom_err)
libhdb (-lhdb)
libkafs (-lkafs)
Kerberos 5 libraries. The libraries libasn1, libcom_err, libhdb,
and libkafs are all hard links to libkrb5. See krb5(3).

libkvm (-lkvm)
Kernel memory interface library. Provides a uniform interface
for accessing kernel virtual memory images, including live sys-
tems and crash dumps. See kvm(3).

libl (-ll)
libfl (-lfl)
The library for lex(1), a lexical analyzer generator. The libfl
library is a hard link to libl.

libm (-lm)
Mathematical functions which comprise the C math library, libm.
See math(3).

libmenu (-lmenu)
Terminal-independent facilities for composing menu systems on
character-cell terminals. Functions using the libmenu library
must be linked with the libcurses library, i.e. -lmenu -lcurses.
See menu(3).

libmilter (-lmilter)
The sendmail(8) mail filter API. See the documentation in
/usr/share/doc/html/milter/.

libobjc (-lobjc)
Library for Objective C, an object-oriented superset of ANSI C.
Use this to compile Objective C programs.

libocurses (-locurses)
libotermcap (-lotermcap)
Routines to provide the user with a method of updating screens
with reasonable optimisation. The ocurses(3) library is compati-
ble with the curses library provided in 4.3. libotermcap is the
4.3-compatible termcap library, and is a hard link to libocurses.
See otermcap(3).

libossaudio (-lossaudio)
Provides an emulation of the OSS (Linux) audio interface. This
is used only for porting programs. See ossaudio(3).

libpanel (-lpanel)
Terminal-independent facilities for stacked windows on character-
cell terminals. Functions using the libpanel library must be
linked with the libcurses library, i.e. -lpanel -lcurses. See
panel(3).

libpcap (-lpcap)
Packet capture library. All packets on the network, even those
destined for other hosts, are accessible through this library.
See pcap(3).

libperl (-lperl)
Support routines for perl(1).

libpthread (-pthread)
IEEE Std 1003.1-2001 (``POSIX'') threads API and thread sched-
uler. Threaded applications should use -pthread not -lpthread.
See pthreads(3). Note: users do not normally have to explicitly
link with this library.

libreadline (-lreadline)
Command line editing interface. See readline(3).

librpcsvc (-lrpcsvc)
Generated by rpcgen(1), containing stub functions for many common
rpc(3) protocols.

libsectok (-lsectok)
Library for communicating with ISO 7816 smartcards. See
sectok(3).

libskey (-lskey)
Support library for the S/Key one time password (OTP) authentica-
tion toolkit. See skey(3).

libssl (-lssl)
The OpenSSL ssl library implements the Secure Sockets Layer (SSL
v2/v3) and Transport Layer Security (TLS v1) protocols. See
ssl(3).

libstdc++ (-lstdc++)
GCC subroutine library for C++. See c++(1). Note: users do not
normally have to explicitly link with this library.

libsupc++ (-lsupc++)
(GCC 3.3.x systems only) C++ core language support (exceptions,
new, typeinfo). Note: users do not normally have to explicitly
link with this library.

libusbhid (-lusbhid)
Routines to extract data from USB Human Interface Devices (HIDs).
See usbhid(3).

libutil (-lutil)
System utility functions. These are currently check_expire(3),
fmt_scaled(3), fparseln(3), getmaxpartitions(3),
getrawpartition(3), login(3), login_fbtab(3), opendev(3),
opendisk(3), openpty(3), pidfile(3), pw_init(3), pw_lock(3),
readlabelfs(3) and uucplock(3).

libwrap (-lwrap)
TCP wrapper access control library. See hosts_access(3) and
rfc1413(3).

liby (-ly)
The library for yacc(1), an LALR parser generator.

libz (-lz)
General purpose data compression library. The functions in this
library are documented in compress(3). The data format is de-
scribed in RFCs 1950 - 1952.

Platform-specific libraries:

libalpha (-lalpha)
Alpha I/O and memory access functions. See inb(2).

libamd64 (-lamd64)
AMD64 I/O and memory access functions. See amd64_get_ioperm(2)
and amd64_iopl(2).

libarm (-larm)
ARM I/O and memory access functions. See arm_drain_writebuf(2)
and arm_sync_icache(2).

libi386 (-li386)
i386 I/O and memory access functions. See i386_get_ioperm(2),
i386_get_ldt(2), i386_iopl(2), and i386_vm86(2).

LIBRARY TYPES
The system libraries are located in /usr/lib. Typically, a library will
have a number of variants:

libc.a
libc.so.30.1
libc_p.a
libc_pic.a

Libraries with an `.a' suffix are static. When a program is linked
against a library, all the library code will be linked into the binary.
This means the binary can be run even when the libraries are unavailable.
However, it can be inefficient with memory usage. The C compiler, cc(1),
can be instructed to link statically by specifying the -static flag.

Libraries with a `.so.X.Y' suffix are dynamic libraries. When code is
compiled dynamically, the library code that the application needs is not
linked into the binary. Instead, data structures are added containing
information about which dynamic libraries to link with. When the binary
is executed, the run-time linker ld.so(1) reads these data structures,
and loads them at a virtual address using the mmap(2) system call.

`X' represents the major number of the library, and `Y' represents the
minor number. In general, a binary will be able to use a dynamic library
with a differing minor number, but the major numbers must match. In the
example above, a binary linked with minor number `3' would be linkable
against libc.so.30.1, while a binary linked with major number `31' would
not.

The advantages of dynamic libraries are that multiple instances of the
same program can share address space, and the physical size of the binary
is smaller. The disadvantage is the added complexity that comes with
loading the libraries dynamically, and the extra time taken to load the
libraries. Of course, if the libraries are not available, the binary
will be unable to execute. The C compiler, cc(1), can be instructed to
link dynamically by specifying the -shared flag, although on systems that
support it, this will be the default and need not be specified.

Libraries with a `_p.a' suffix are profiling libraries. They contain ex-
tra information suitable for analysing programs, such as execution speed
and call counts. This in turn can be interpreted by utilities such as
gprof(1). The C compiler, cc(1), can be instructed to generate profiling
code, or to link with profiling libraries, by specifying the -pg flag.

Libraries with a `_pic.a' suffix contain position-independent code (PIC).
Normally, compilers produce relocatable code. Relocatable code needs to
be modified at run-time, depending on where in memory it is to be run.
PIC code does not need to be modified at run-time, but is less efficient
than relocatable code. PIC code is used by shared libraries, which can
make them slower. The C compiler, cc(1), can be instructed to generate
PIC code, or to link with PIC libraries, by specifying the -fpic or -fPIC
flags.

With the exception of dynamic libraries, libraries are generated using
the ar(1) utility. The libraries contain an index to the contents of the
library, stored within the library itself. The index lists each symbol
defined by a member of a library that is a relocatable object file. This
speeds up linking to the library, and allows routines in the library to
call each other regardless of their placement within the library. The
index is created by ranlib(1) and can be viewed using nm(1).

The building of PIC versions of libraries and dynamic libraries can be
prevented by setting the variable NOPIC in /etc/mk.conf. The building of
profiling versions of libraries and/or dynamic libraries can be prevented
by setting the variable NOPROFILE in /etc/mk.conf. See mk.conf(5) for
more details.

FILES
/usr/lib/libasn1.a
/usr/lib/libc.a
/usr/lib/libcom_err.a
/usr/lib/libcompat.a
/usr/lib/libcrypto.a
/usr/lib/libcurses.a
/usr/lib/libdes.a
/usr/lib/libedit.a
/usr/lib/libevent.a
/usr/lib/libexpat.a
/usr/lib/libfl.a
/usr/lib/libform.a
/usr/lib/libfrtbegin.a
/usr/lib/libg2c.a
/usr/lib/gcc-lib/${ARCH}-unknown-openbsd${OSREV}/${GCCREV}/fpic/libgcc.a
/usr/lib/libgssapi.a
/usr/lib/libhdb.a
/usr/lib/libiberty.a
/usr/lib/libkadm5clnt.a
/usr/lib/libkadm5srv.a
/usr/lib/libkafs.a
/usr/lib/libkeynote.a
/usr/lib/libkrb5.a
/usr/lib/libkvm.a
/usr/lib/libl.a
/usr/lib/libm.a
/usr/lib/libmenu.a
/usr/lib/libmilter.a
/usr/lib/libncurses.a
/usr/lib/libobjc.a
/usr/lib/libocurses.a
/usr/lib/libossaudio.a
/usr/lib/libotermcap.a
/usr/lib/libpanel.a
/usr/lib/libpcap.a
/usr/lib/libperl.a
/usr/lib/libpthread.a
/usr/lib/libreadline.a
/usr/lib/librpcsvc.a
/usr/lib/libsectok.a
/usr/lib/libskey.a
/usr/lib/libssl.a
/usr/lib/libstdc++.a
/usr/lib/libsupc++.a
/usr/lib/libtermcap.a
/usr/lib/libtermlib.a
/usr/lib/libusbhid.a
/usr/lib/libutil.a
/usr/lib/libwrap.a
/usr/lib/liby.a
/usr/lib/libz.a

/usr/lib/libalpha.a
/usr/lib/libamd64.a
/usr/lib/libarm.a
/usr/lib/libi386.a

SEE ALSO
ar(1), c++(1), cc(1), g77(1), gcc-local(1), gprof(1), ld(1), ld.so(1),
lex(1), nm(1), perl(1), ranlib(1), yacc(1), intro(2), compress(3),
crypto(3), curses(3), des_crypt(3), editline(3), event(3), form(3),
hosts_access(3), keynote(3), kvm(3), math(3), menu(3), ocurses(3),
ossaudio(3), panel(3), pcap(3), pthreads(3), readline(3), rfc1413(3),
rpc(3), sectok(3), skey(3), ssl(3), stdio(3), termcap(3), usbhid(3),
keynote(4), mk.conf(5)

HISTORY
An intro manual appeared in Version 7 AT&T UNIX.

OpenBSD 4.4 August 26, 2008
分享到:
评论

相关推荐

    intro-to-professional-web-dev:JavaScript专业Web开发简介

    操作符用于比较和改变值,流程控制如条件语句(if-else)和循环(for、while)用于控制程序执行顺序。函数则封装可重用的代码段。 二、DOM操作 文档对象模型(DOM)是HTML和XML文档的结构表示。JavaScript可以用来...

    intro-to-javascript

    初学者JavaScript 该存储库包含Dev Bootcamp的开源JavaScript for Beginners研讨会的幻灯片和模板文件。

    intro-to-ruby

    面向初学者的Ruby 该存储库包含Dev Bootcamp的Ruby for Beginners研讨会的幻灯片和模板文件。

    react-intro-2021

    将新软件包添加到仓库 // For dependencies $ yarn add $ npm install ...$ npm install --save-dev 使用的库 airbnb eslint配置: ://www.npmjs.com/package/eslint-config-airbnb mdi-react( ): :

    Express in Action: Writing, building, and testing Node.js applications

    By the end of the book, you'll be able to use Express to build a Node app and know how to test it, hook it up to a database, and automate the dev process. What's Inside Simplify Node app setup ...

    BI-LSTM-CRF-for-Aspect-Extraction

    CRF用于方面提取-情感提取数据->通过BDCI 2017基于主题的文本情感分析的训练数据修改的数据集: ://www.datafountain.cn/#/competitions/268/intro,最后访问时间2018/5/13 train.csv->培训文件大小:13652 dev.csv-...

    auto-skip-for-netflix-and-prime:自动跳过简介,Netflix和Prime概述

    自动跳过Prime和NetFlix(ASPN) 自动跳过介绍,Prime和NetFlix的摘要在Netflix和Amazon Prime上跳过那些冗长的介绍序列和重述非常繁琐,您每次都... npm run build:dev或者yarn run build:dev添加您的母语(Prime)

    restAssured:用于构建Web应用程序的实验平台

    放心 用于设置任何Web项目的API。...https://docs.djangoproject.com/en/dev/intro/install/ for instructions on installation. 要构建自己的应用程序: + Go to main directory 'restAssured', run: 'dj

    V4L2架构介绍

    V4L2,全称Video for Linux Two,是Linux内核中的一个接口,用于支持视频设备,包括摄像头、电视卡等。它为用户空间应用程序提供了一种标准的方式来访问和控制这些设备,实现了视频捕获、视频输出、图像处理等功能。...

    pandas库的概要介绍与分析

    - **DataCamp的Pandas教程**(https://www.datacamp.com/courses/intro-to-python-for-data-science):适合初学者,通过互动课程学习Pandas的基本操作。 ##### 3.2 实践教程 - **Kaggle Learn的Pandas微课程**...

    XML轻松学习手册--XML肯定是未来的发展趋势,不论是网页设计师还是网络程序员,都应该及时学习和了解

    3.名字不能以字母 xml (或 XML 或 Xml ..) 开头; 4.名字中不能包含空格。 在XML文档中任何的差错,都会得到同一个结果:网页不能被显示。各浏览器开发商已经达成协议,对XML实行严格而挑剔的解析,任何细小的错误...

    Django如何批量创建Model

    {"title": "官方Django教程", "url": "https://docs.djangoproject.com/en/1.9/intro/tutorial01/"}, {"title": "Django Rocks", "url": "http://www.djangorocks.com/"}, {"title": "如何用Django起舞", "url": ...

Global site tag (gtag.js) - Google Analytics