`
hanyh
  • 浏览: 235460 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ar description

阅读更多
ar is considered a binary utility because archives of this sort are most often used as libraries holding commonly needed subroutines.

Linux Library Types:

There are two library types which can be created:

   1. Static libraries (.a): Library of object code which is linked with, and becomes part of the application.
   2. Dynamically linked shared object libraries (.so): There is only one form of this library but it can be used in two ways.
         1. Dynamically linked at run time but statically aware. The libraries must be available during compile/link phase. The shared objects are not included into the executable component but are tied to the execution.
         2. Dynamically loaded/unloaded and linked during execution (i.e. browser plug-in) using the dynamic linking loader system functions.

Library naming conventions:
Libraries are typically names with the prefix "lib". This is true for all the C standard libraries. When linking, the command line reference to the library will not contain the library prefix or suffix.

Thus the following link command: gcc src-file.c -lm -lpthread
The libraries referenced in this example for inclusion during linking are the math library and the thread library. They are found in /usr/lib/libm.a and /usr/lib/libpthread.a.


void ctest1(int *i)
{
   *i=5;
}
            
void ctest2(int *i)
{
   *i=100;
}
    #include <stdio.h>
void ctest1(int *);
void ctest2(int *);

int main()
{
   int x;
   ctest1(&x);
   printf("Valx=%d\n",x);

   return 0;
}
        

# Compile: cc -Wall -c ctest1.c ctest2.c
Compiler options:

    * -Wall: include warnings. See man page for warnings specified.

# Create library "libctest.a": ar -cvq libctest.a ctest1.o ctest2.o
# List files in library: ar -t libctest.a
# Linking with the library:

    * cc -o executable-name prog.c libctest.a
    * cc -o executable-name prog.c -L/path/to/library-directory -lctest

gcc -o prog prog.c libctest.a 
cc -o executable-name prog.c -L/path/to/library-directory -lctest

cc -o executable-name prog.c -L/home/hanyh/workspace/cplusplus/linux -lctest



分享到:
评论

相关推荐

    黑苹果AR9485无线驱动

    4. 使用DSDT(Differentiated System Description Table)或SSDT(Supplementary System Description Table)优化,以提高驱动兼容性。 5. 跟踪并更新最新的驱动程序,以获取bug修复和性能提升。 6. 如果问题依然...

    AR.Drone开发手册

    手册还提供了AT命令的概要(Summary)和详尽的命令描述(Commands description),为开发者提供了关于如何使用这些命令来操控AR.Drone的详尽信息。 整体来看,AR.Drone开发手册是开发者针对AR.Drone四轴飞行器进行...

    ar0330cs sensor datasheet

    | Part Number | Description | |--------------------|--------------------------------------------------| | AR0330CM1C00SHAA0 | 48pin CLCC (HiSPi/MIPI) 0°C RA | | AR0330CM1C12SHAA0 | 48pin CLCC (HiSPi/...

    AR8031-AL1B QFN48+RJ45,HR862138H,千兆,带灯,带变压器 AD集成封装库.zip

    Name Description ---------------------------------------------------------------------------------------------------- 74AUP1G00GW 74LVC244AD 74LVC2G34GW 9DML0441AKILFT AR8031 BAT54C Battery Bead ...

    AR0521 D 20200221.PDF

    Description The AR0521 is a 1/2.5−inch CMOS digital image sensor with an active−pixel array of 2592 (H) x 1944 (V). It captures images in either linear or high dynamic range modes with a rolling...

    AR0330_DS_R.

    Features Applications General Description Ordering Information General Description Functional Overview. Working Modes HiSPi Power Supply Connections Pin Descriptions Sensor Initialization

    基于Burg法的AR模型参数估计和阶数估计

    - **MDL**(Minimum Description Length):寻求最简洁的模型,即描述数据所需的最少信息量。 - **BIC**(Bayesian Information Criterion):与AIC类似,但引入了惩罚项,更倾向于选择简单的模型。 4. **功率谱...

    Beginning iOS AR Game Development:Developing Augmented Reality Apps.epub

    Description Create a fully featured application that’s both sophisticated and engaging. This book provides a detailed guide in developing augmented reality games that can take advantage of the ...

    Dyadic AR_UIST2014

    ### Dyadic Projected ... The detailed technical description provided in the paper, along with the results from initial experiments, highlights the potential impact of this technology on various fields.

    ROS_AR2_urdf:从sw2urdf为AR2机械手生成的urdf文件

    在本项目中,“ROS_AR2_urdf”是一个针对AR2机械手的URDF(Unified Robot Description Format)模型。 URDF是ROS中用于描述机器人结构的标准XML格式,它包括机器人的链接、关节、传感器等信息。通过URDF,开发者...

    ROS_AR2_moveit_config:AR2机械手的ROS moveit配置文件

    在给定的“ROS_AR2_moveit_config”项目中,我们关注的是AR2机械手的ROS MoveIt!配置。 MoveIt!是ROS中的一个核心库,它提供了高级运动规划、碰撞检测和仿真等功能。MoveIt!允许开发者为机器人创建智能运动规划,...

    Local Difference Binary for Ultrafast and Distinctive Feature Description

    随着计算机视觉技术的发展及其在众多领域中的应用不断扩展,如增强现实(Augmented Reality, AR)、即时定位与地图构建(Simultaneous Localization and Mapping, SLAM)以及图像检索等,高效且高质量的特征描述符...

    SUITS Mission Description FY22.pdf

    1. **增强现实(AR)技术**:下一代月球宇航服的重要组成部分是视觉显示和控制系统,该系统利用AR技术为宇航员提供关键信息,如与月球载荷交互、支持科学研究、可视化消耗品、优化通信以及地形导航。这标志着NASA...

    filter_ar.rar_The Signal

    This file contains the function WebRtcSpl_FilterAR(). The description header can be found in signal_processing_library.h.

    Packt.Augmented.Reality.Game.Development.1787122883

    Book Description Have you been bitten by the Pokemon Go bug yet? If yes, then this is the right book for you. Location-based AR games have been around for a few years. They have struggled to gain ...

    Complete Virtual Reality and Augmented Reality Development with Unity-2019.epub

    Using a practical and project-based approach, this Learning Path educates you about the specifics of AR and VR development using Unity 2018 and Unity 3D. You'll learn to integrate, animate, and ...

    csAR:Cordova的增强现实插件

    --variable IOS_PERMISSION_DESCRIPTION="Description when requestion Location Permission from user (on iOS)" 该插件发布在NPM上。 您应该使用Cordova CLI版本5或更高版本。 用法 CanDoAr cloudSky.ar....

    Storage and Retrieval of L ar ge RDF G raph Usin g Had o op and MapReduce

    RDF是Resource Description Framework(资源描述框架)的缩写,这是一种用于描述网络资源的数据模型。Hadoop是一个分布式存储和处理大数据的系统框架,而MapReduce是Hadoop的核心组件,用于处理大量数据。这篇文章的...

    Virtual & Augmented Reality For Dummies by Paul Mealy-2018.pdf

    Description An easy-to-understand primer on Virtual Reality and Augmented Reality Virtual Reality (VR) and Augmented Reality (AR) are driving the next technological revolution. If you want to get in ...

Global site tag (gtag.js) - Google Analytics