One, the Linux operating system support function library BranchStatic libraries: LIBXXX.A, compiling libraries into executable programs at compile timeAdvantage: No external function library is required in the program's running environmentCons: Large executable programDynamic libraries: Also known as shared libraries,
1. Runtime Library: a typical Runtime library example in UNIX is libc, which contains standard C functions, such as print () and exit, users can create their own runtime libraries (DLL in Windows), and the specific details depend on the compiler and operating system.
2. Static Library: functions and data are compiled into a binary file (typically with the extension. lib), the static library is actually linked to the EXE during the link, and the libr
Linux uses static libraries and dynamic libraries(a) The concept of the libraryLibraries are reusable code, and libraries are often used in large projects.In essence , a library is a binary form of executable code that can be loaded into memory by the operating system. Generally speaking, the library is said two kinds:Static
The concept of a library file
In many cases, source code files can also be shared by multiple programs. So the first step in reducing your workload is to compile the source code files only once, and then link them to a different executable file when you need them. Although this technique can save compile time, its disadvantage is that you still need to name all the target files when linking. In addition, a large number of target files will be scattered in various directories on the system, resul
The Static connection library and dynamic link Library of Linux is not clear, after reading a blog post, now want to do a summary of their own to deepen the impression:1, the basic concept of the library:A library is a binary form of executable code that can be called into the operating system to be transferred into memory for execution.Both the Windows and Linux systems have their own libraries, but the libraries
1 Classification of libraries
Depending on the link period, the library is divided into static and dynamic libraries.
The static library is linked in the link phase (as if it were nonsense, but this is the case), so the resulting executable file is not affected by the library, and even if the library is deleted, the program can still run successfully.
Unlike static l
name of the compiled source file. GCC also supports linking to a static library using the-static option.GCC main.c-static./static_lib.a-o appcompiling a dynamic libraryDynamic libraries are also known as shared libraries or dynamic-link libraries, and dynamic-link libraries are used extensively in modern programs. For
Directory:1 manually establishing static libraries 2 use of static libraries 3 creating a static library from a makefile file1 Creating a static library manually will create a simple static library-1: Compile the required source files into the target file------Helpguy.h#ifndef __helpguy_h__#define __helpguy_h__#include ------helpguy.cc#include "helpguy.h" #include Compile:g++-C helpguy.cc//Generate file: HE
)
INSTALL (FILES RefineOffaxis.h destination Include/refineoffaxis)1 analysis of the above CMakeLists.txt
Cmake_minimum_required (version 2.8) specifies the minimum version required for CMake
Project (Refineoffaxis) specifies the name of the item
Aux_source_directory (. Dir_srcs) aux_source_directory (dir variable) gets all the files in the specified directory and saves them to variable, including. C. C. C + +. cc. cpp. cxx. M. M. h++. H. hh. hpp. hxx. txx file, which assigns the source file nam
Tag:echotest startup libusr Environment Variables inuxshared no The code of the called function in the static library static library under Linux will be copied to the executable file together at compile time!! Executable files do not need static libraries to be present! II. Construction and use of dynamic libraries under Linux 1. Building the dynamic library gcc-fpic-shared -o Lib library name .so Sou
Linux GCC compiles dynamic class libraries (. So) and static class libraries (. a)My compilation environment for Ubuntu desktop 16.04One: Test codeThe test has 3 files: ab.h,ab.c,test.c//AB.hvoidhello ();//AB.C#include voidHello () {printf ("Hello from AB.C \ n");}//test.c#include #include"AB.h"voidMainvoid) {printf ("It is main\n"); Hello ();}View CodeUsing GCC, compile and run to display the results:[Emai
Linux command ar-Create a static library. A file
Purpose descriptionCreate a static library. A file. It's often used when developing programs with C + +, but I rarely use the AR command on the command line alone, which is generally written in makefile and sometimes used in shell scripts. For Linux library files, static libraries, dynamic libraries and how to create and use related knowledge, see the relevan
Create a static libraryBuild four file Bin (executable file), Lib (library), include (header file), src (release source file)Here's the cumming for addRun in src file1) gcc-c ADD.C//compile ADD.C source file to generate ADD.O target file2) AR crsv. /LIB/LIBADD.A ADD.O//Archive The target file *.o, generate the LIB*.A, and put the generated file in Lib3) Gcc-o main main.c-l (Larger love dolls, the path of the library). /lib–l (Lowercase love puppet, library named Add) add–i (uppercase I): /includ
Create a static libraryBuild four files Bin (executable file), Lib (library), include (header file), src (release source file)Here's the cumming for addExecute in src file1) gcc-c ADD.C//compile ADD.C source file to generate ADD.O target file2) AR crsv. /LIB/LIBADD.A ADD.O//Archive The target file *.o, generate the LIB*.A, and put the generated file in Lib3) Gcc-o main main.c-l (Larger love dolls, the path of the library). /lib–l (Lowercase love puppet, library named Add) add–i (uppercase I): /i
Linux has two types of function libraries, dynamic libraries and static libraries
Static Library:
This type of library is typically a file with a suffix of. A, and a file compiled with a static library function is larger because all of the data in the library is integrated into the target code.
The compiled execution program does not require external function
件#include 函数原型FILE *tmpfile(void);返回值成功为文件指针出错为NULL为临时文件创建一个文件名头文件#include 函数原型char *tmpnam(char *s);返回值指向唯一路径名的指针Fcntl () function function Manipulation file description such as copy, get/Set file descriptor flag, get/Set file status flag, management Recommendation file Lock file #include #include function prototype Span class= "Hljs-keyword" >int fcntl (int FD, int cmd); int fcntl (int fd, int cmd, long arg); int fcntl (int FD, int cmd, struct flock * Lock ); Return value succ
the compiler. It is not necessary to use the import statement in the program. It contains classes and interfaces that are necessary for all actual Java programs.
Object class
Math Class (Math)
Data type class
Thread class
String Class (String class and StringBuffer Class)
Systems and Runtime classes (System class and runtime Class)
Error and exception handling classes (Throwable, Exception, error)
Procedure Class (process)
java.util bag1. Date classes,
"CMake" is executed. The Times SSL did not find a related error because SSL was not installed on this computer. Self-Baidu SSL installation method.If you do not need to enable the SSL (secure connection) feature, open the Home directory(/home/kylin/test/rabbitmq-c-... ), locate CMakeLists.txt, open and find Enable_ssl_support, and change the "on" after "on" to "Off" (option (enable_ssl_support "ENABLE SSL support" off), Then delete all files under the build directory (be sure to delete) and sta
Knowledge Point Analysis:
1, the registry operation is risky, please back up the registration form before operation;
2, the experimental environment for the WIN10 Technology Preview version (9841).
Operation Steps:
In Windows systems, libraries are a very special folder. With it, you can easily manage documents, music, pictures, and videos in your system. But it doesn't store anything, it just monitors the added folder item, and deleting
libraries, multiple applications share the same library files in memory, saving resources3 using a dynamic library, you can update the dynamic library file to update the application without recompiling the connection executable.From 1 can be drawn, the entire application module, teamwork, Division of labor, the impact is relatively small.and other benefits,As can be seen from 2, in fact, the dynamic library should be called Shared library, in this se
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.