目前分類:編譯相關 (26)

瀏覽方式: 標題列表 簡短摘要
Why libraries are used:

This methodology, also known as "shared components" or "archive libraries", groups together multiple compiled object code files into a single file known as a library. Typically C functions/C++ classes and methods which can be shared by more than one application are broken out of the application's source code, compiled and bundled into a library. The C standard libraries and C++ STL are examples of shared components which can be linked with your code. The benefit is that each and every object file need not be stated when linking because the developer can reference the individual library. This simplifies the multiple use and sharing of software components between applications. It also allows application vendors a way to simply release an API to interface with an application. Components which are large can be created for dynamic use, thus the library remain separate from the executable reducing it's size and thus disk space used. The library components are then called by various applications for use when needed.


Linux Library Types:

There are two Linux C/C++ 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.

立你斯 發表在 痞客邦 留言(0) 人氣()

http://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html


立你斯 發表在 痞客邦 留言(0) 人氣()

http://blog.udn.com/keithmin/631169


前言

動態連結程式庫(Shared library)是在程式開始執行時才載入的,其優點在於(1)減少執行檔的大小,(2)更新程式庫而無需重新編譯其他程式,以及(3)甚至可在程式執行時更改程式庫。

立你斯 發表在 痞客邦 留言(0) 人氣()

http://xifage.com/gcc-4-6-warning-variable-set-but-not-used/


立你斯 發表在 痞客邦 留言(0) 人氣()

Wsequence-point

什麼是sequence point?

立你斯 發表在 痞客邦 留言(0) 人氣()

关于dynamic library存在却找不到的解决方法

有朋友问在linux中动态链接库.so文件在机器上却无法load,以mplayer为例,编译时正常。但运行时却出现如下问题:


./mplayer

立你斯 發表在 痞客邦 留言(0) 人氣()

 原文網址 http://hi.baidu.com/lanyi_522/blog/item/c944663412e248bcd0a2d309.html


 

立你斯 發表在 痞客邦 留言(0) 人氣()

http://www.jb.man.ac.uk/~slowe/cpp/itoa.html


如上網址 最後的

立你斯 發表在 痞客邦 留言(0) 人氣()

#!/bin/bash


Date=$(date +'%Y%m%d-%H%M')

立你斯 發表在 痞客邦 留言(0) 人氣()

http://fanqiang.chinaunix.net/a4/b8/20010704/130401784_b.html


 

立你斯 發表在 痞客邦 留言(0) 人氣()

obj-m:=spi_module.o


KERNEL_PATH=/home/......../2.6.29

立你斯 發表在 痞客邦 留言(0) 人氣()

http://hi.baidu.com/grdd/blog/item/9b4e9b8f99ca82f6513d92e4.html


get_opt()函數:

立你斯 發表在 痞客邦 留言(0) 人氣()

 

selectI/O多工機制)


立你斯 發表在 痞客邦 留言(0) 人氣()

 


http://yuanma.org/data/2007/0201/article_2213.htm

立你斯 發表在 痞客邦 留言(0) 人氣()

  • Nov 26 Thu 2009 18:15
  • GCC 1

Linux 中最重要的软件开发工具是 gcc。gcc是 GNU 的 C 和 C++ 编译器。实际上,gcc能够编译三种语言:C、C++ 和 Object C(C 语言的一种面向对象扩展)。利用 gcc 命令可同时编译并连接 C 和 C++ 源程序。

在学习之前需要了解的是,在使用gcc或g++执行编译的时候,具体的过程如何。如下所示:

立你斯 發表在 痞客邦 留言(0) 人氣()

  • Nov 26 Thu 2009 18:14
  • GCC 2


 


立你斯 發表在 痞客邦 留言(0) 人氣()

ubuntu下gcc編程入門

2008年10月05日星期日10:00 A.M.

立你斯 發表在 痞客邦 留言(0) 人氣()

 


立你斯 發表在 痞客邦 留言(0) 人氣()

 

在基于ARM的嵌入式系統開發中,常常用到交叉編譯的GCC工具鏈有兩種:


立你斯 發表在 痞客邦 留言(0) 人氣()

嵌入式作業系統橫向解析


 

立你斯 發表在 痞客邦 留言(0) 人氣()

1 2