??xml version="1.0" encoding="utf-8" standalone="yes"?>免费一级做a爰片久久毛片潮,99久久99这里只有免费费精品,亚洲国产成人精品女人久久久http://www.shnenglu.com/wc250en007/category/18815.html前进的\?/description>zh-cnSat, 03 Nov 2012 04:26:49 GMTSat, 03 Nov 2012 04:26:49 GMT60有关Linux?a?so?o文g(?http://www.shnenglu.com/wc250en007/archive/2012/11/03/194186.htmlLet me see seeLet me see seeFri, 02 Nov 2012 23:53:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/11/03/194186.htmlhttp://www.shnenglu.com/wc250en007/comments/194186.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/11/03/194186.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/194186.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/194186.htmlgcc 生成 .a静态库?.so动态库 

我们通常把一些公用函数制作成函数库,供其它程序用。函数库分ؓ静态库和动态库?/span>
U。静态库在程序编译时会被q接到目标代码中Q程序运行时不再需要该静态库。动?/span>
库在E序~译时ƈ不会被连接到目标代码中,而是在程序运行是才被载入Q因此在E序q?/span>
行时q需要动态库存在。本文主要通过举例来说明在Linux中如何创建静态库和动态库Q以
及用它们?/span>

在创建函数库前,我们先来准备举例用的源程序,q将函数库的源程序编译成.o文g?/span>


W?步:~辑得到举例的程?-hello.h、hello.c和main.cQ?/span>

hello.c(见程?)是函数库的源E序Q其中包含公用函数helloQ该函数在屏幕上输?
Hello XXX!"。hello.h(见程?)函数库的头文件。main.c(见程?)为测试库文g?/span>
ȝ序,在主E序中调用了公用函数hello?/span>

E序1: hello.h

#ifndef HELLO_H
#define HELLO_H

void hello(const char *name);

#endif //HELLO_H



E序2: hello.c

#include <stdio.h>

void hello(const char *name)
{
printf("Hello %s!\n", name);
}

E序3: main.c

#include "hello.h"

int main()
{
hello("everyone");
return 0;
}

W?步:hello.c~译?o文gQ?/span>

无论静态库Q还是动态库Q都是由.o文g创徏的。因此,我们必须源E序hello.c通过g
cc先编译成.o文g?/span>

在系l提C符下键入以下命令得到hello.o文g?/span>

# gcc -c hello.c

#

我们q行ls命o看看是否生存了hello.o文g?/span>

# ls

hello.c hello.h hello.o main.c

#


在ls命ol果中,我们看到了hello.o文gQ本步操作完成?/span>

下面我们先来看看如何创徏静态库Q以及用它?/span>

W?步:?o文g创徏静态库Q?/span>

静态库文g名的命名规范是以lib为前~Q紧接着跟静态库名,扩展名ؓ.a。例如:我们?/span>
创徏的静态库名ؓmyhelloQ则静态库文g名就是libmyhello.a。在创徏和用静态库Ӟ
需要注意这炏V创建静态库用ar命o?/span>

在系l提C符下键入以下命令将创徏静态库文glibmyhello.a?/span>

# ar -crv libmyhello.a hello.o

#

我们同样q行ls命o查看l果Q?/span>

# ls

hello.c hello.h hello.o libmyhello.a main.c

#

ls命ol果中有libmyhello.a?/span>

W?步:在程序中使用静态库Q?/span>

静态库制作完了Q如何用它内部的函数呢Q只需要在使用到这些公用函数的源程序中?/span>
含这些公用函数的原型声明Q然后在用gcc命o生成目标文g时指明静态库名,gcc会?/span>
静态库中将公用函数q接到目标文件中。注意,gcc会在静态库名前加上前缀libQ然后追
加扩展名.a得到的静态库文g名来查找静态库文g?/span>

在程?:main.c中,我们包含了静态库的头文ghello.hQ然后在ȝ序main中直接调用公
用函数hello。下面先生成目标E序helloQ然后运行helloE序看看l果如何?/span>

法一 # gcc -o hello main.c -L. –lmyhelloQ自定义的库Ӟmain.cq可攑֜-L.?–lmyhello之间Q但是不能放在它俩之后,否则会提Cmyhello没定义,但是是系l的库时Q如g++ -o mainQ?L/usr/libQ?-lpthread main.cpp׃出错?/span>

法二 #gcc main.c libmyhello.a -o hello

法三Q先生成main.oQgcc -c main.c Q再生成可执行文Ӟgcc -o hello main.o libmyhello.aQ动态库q接时也可以q样做?/span>



# ./hello

Hello everyone!

#

我们删除静态库文g试试公用函数hello是否真的q接到目标文?hello中了?/span>

# rm libmyhello.a

rm: remove regular file `libmyhello.a'? y

# ./hello

Hello everyone!

#

E序照常q行Q静态库中的公用函数已经q接到目标文件中了?/span>

我们l箋看看如何在Linux中创建动态库。我们还是从.o文g开始?/span>

W?步:?o文g创徏动态库文gQ?/span>

动态库文g名命名规范和静态库文g名命名规范类|也是在动态库名增加前~libQ但?/span>
文g扩展名ؓ.so。例如:我们创建的动态库名ؓmyhelloQ则动态库文g名就是libmyh
ello.so。用gcc来创建动态库?/span>

在系l提C符下键入以下命令得到动态库文glibmyhello.so?/span>



# gcc -shared -fPCI -o libmyhello.so hello.o Q?o不可)

#

我们照样使用ls命o看看动态库文g是否生成?/span>

# ls

hello.c hello.h hello.o libmyhello.so main.c

#

W?步:在程序中使用动态库Q?/span>

在程序中使用动态库和用静态库完全一P也是在用到q些公用函数的源E序中包?/span>
q些公用函数的原型声明,然后在用gcc命o生成目标文g时指明动态库名进行编译。我?/span>
先运行gcc命o生成目标文gQ再q行它看看结果?/span>

# gcc -o hello main.c -L. -lmyhello



(?#gcc main.c libmyhello.so -o hello 不会出错Q没有libmyhello.so的话Q会出错Q,但是接下?/hello 会提C出错,因ؓ虽然q接时用的是当前目录的动态库Q但是运行时Q是?usr/lib中找库文件的Q将文glibmyhello.so复制到目?usr/lib中就O(jin)K?

# ./hello

./hello: error while loading shared libraries: libmyhello.so: cannot open shar
ed object file: No such file or directory

#

哦!出错了。快看看错误提示Q原来是找不到动态库文glibmyhello.so。程序在q行Ӟ
会在/usr/lib?lib{目录中查找需要的动态库文g。若扑ֈQ则载入动态库Q否则将?/span>
C类gq错误而终止程序运行。我们将文glibmyhello.so复制到目?usr/lib中,再试
试?/span>

# mv libmyhello.so /usr/lib

# ./hello

Hello everyone!

#

成功了。这也进一步说明了动态库在程序运行时是需要的?/span>

我们回过头看看,发现使用静态库和用动态库~译成目标程序用的gcc命o完全一P
那当静态库和动态库同名Ӟgcc命o会用哪个库文g呢?q寚w题必I到底的心情Q?/span>
来试试看?/span>

先删除除.c?h外的所有文Ӟ恢复成我们刚刚编辑完举例E序状态?/span>

# rm -f hello hello.o /usr/lib/libmyhello.so

# ls

hello.c hello.h main.c

#

在来创徏静态库文glibmyhello.a和动态库文glibmyhello.so?/span>

# gcc -c hello.c

# ar -cr libmyhello.a hello.o Q或-cvr Q?/span>

# gcc -shared -fPCI -o libmyhello.so hello.o

# ls

hello.c hello.h hello.o libmyhello.a libmyhello.so main.c

#

通过上述最后一条ls命oQ可以发现静态库文glibmyhello.a和动态库文glibmyhello.s
o都已l生成,q在当前目录中。然后,我们q行gcc命o来用函数库myhello生成目标
文ghelloQƈq行E序 hello?/span>

# gcc -o hello main.c -L. –lmyhello Q动态库和静态库同时存在Ӟ优先使用动态库Q?当然Q直?gcc main.c libmyhello.a -o hello的话Q就是指定ؓ静态库了)

# ./hello

./hello: error while loading shared libraries: libmyhello.so: cannot open shar
ed object file: No such file or directory

#

从程序helloq行的结果中很容易知道,当静态库和动态库同名Ӟgcc命o优先用动态库Q默认去q?usr/lib?lib{目录中的动态库Q将文glibmyhello.so复制到目?usr/lib中即可?/span>

Note:
~译参数解析
最主要的是GCC命o行的一个选项:
-shared 该选项指定生成动态连接库Q让q接器生成Tcd的导出符可Q有时候也生成p接Wcd的导出符PQ不用该标志外部E序无法q接。相当于一个可执行文g
-fPIC 表示~译Z|独立的代码Q不用此选项的话~译后的代码是位|相关的所以动态蝲入时是通过代码拯的方式来满不同q程的需要,而不能达到真正代码段׃n的目的?/span>

-L. 表示要连接的库在当前目录中;Q多个库Q在~译命o行中Q将使用的静态库文g攑֜源文件后面就可以了。比如:gcc -L/usr/lib myprop.c libtest.a libX11.a libpthread.a -o myprop
其中-L/usr/lib指定库文件的查找路径。编译器默认在当前目录下先查找指定的库文Ӟ如前面的“法二 #gccmain.c libmyhello.a-o hello”Q?/span>


-lmyhello ~译器查扑֊态连接库时有隐含的命名规则,卛_l出的名字前面加上libQ后面加?so?a来确定库的名Ul(f)ibmyhello.so或libmyhello.a?/span>
LD_LIBRARY_PATHq个环境变量指示动态连接器可以装蝲动态库的\径?/span>
当然如果有root权限的话Q可以修?etc/ld.so.conf文gQ然后调?/sbin/ldconfig来达到同L(fng)目的Q不q如果没有root权限Q那么只能采用输出LD_LIBRARY_PATH的方法了?/span>

调用动态库的时候有几个问题会经常碰刎ͼ有时Q明明已l将库的头文件所在目?通过 “-I” includeq来了,库所在文仉过 “-L”参数引导Qƈ指定?#8220;-l”的库名,但通过ldd命o察看Ӟ是L找不C指定链接的so文gQ这时你要作的就是通过修改 LD_LIBRARY_PATH或?etc/ld.so.conf文g来指定动态库的目录。通常q样做就可以解决库无法链接的问题了?/span>

另:

从上q可知,如何扑ֈ生成的动态库?U方式:

(1)把库拯?usr/lib?lib目录下?/span>

(2)在LD_LIBRARY_PATH环境变量中加上库所在\径?/span>

例如动态库libhello.so?home/example/lib目录下:

$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/example/lib

(3) 修改/etc/ld.so.conf文gQ把库所在的路径加到文g末尾Qƈ执行ldconfigh。这P加入的目录下的所有库文g都可见?/span>

附:像下面这h定\径去q接pȝ的静态库Q会报错说要q接的库找不?

g++ -o main main.cpp -L/usr/lib libpthread.a 

必须q样g++ -o main main.cpp -L/usr/lib -lpthread才正??/span>

自定义的库考到/usr/lib 下时Q?/span>

g++ -o main main.cpp -L/usr/lib libpthread.a libthread.a libclass.a会出错,但是q样g++ -o main main.cpp -L/usr/lib -lpthread -lthread -lclass正了?/span>



转自Qhttp://hi.baidu.com/K�K�K�/blog/item/e58ed2f142913ea7a50f525e.html
来自: http://hi.baidu.com/jiyeqian/blog/item/d6886e22c93f5ef8d6cae27c.html

Let me see see 2012-11-03 07:53 发表评论
]]>
ubunto下安装搜狗拼韌入法http://www.shnenglu.com/wc250en007/archive/2012/07/07/182069.htmlLet me see seeLet me see seeSat, 07 Jul 2012 05:48:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/07/182069.htmlhttp://www.shnenglu.com/wc250en007/comments/182069.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/07/182069.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/182069.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/182069.html
原创作品Q允许{载,转蝲时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将q究法律责Q?a >http://lhflinux.blog.51cto.com/1961662/515610

ubunto下安装搜狗拼韌入法

1.首先下蝲scim安装?/p>

cd /home/haifeng

wget http://scim-python.googlecode.com/files/scim-python-0.1.12.tar.gz

 

2.解压安装?q进入其目录?/p>

haifeng@haifeng-EX38-DS4:~/下蝲$ tar zxf scim-python-0.1.12.tar.gz

haifeng@haifeng-EX38-DS4:~/下蝲$ cd scim-python-0.1.12/

 

3.使用apt-get 安装scim所依赖到扩展库

    sudo apt-get install scim-dev
    sudo apt-get install python-dev
    sudo apt-get install python-enchant
    sudo apt-get install python-gtk2-dev
    sudo apt-get install libgtk2.0-dev
 

4.~译安装scim源码?/p>

    ./configure --prefix=/usr/local
    make
    sudo make install
 

5.重启pȝ reboot

使用 Ctrl+I格?q行切换输入?/p>

 

 

6.成功

 

 

 

本文 “风的linux之\” 博客Q请务必保留此出?a >http://lhflinux.blog.51cto.com/1961662/515610



Let me see see 2012-07-07 13:48 发表评论
]]>
E:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) http://www.shnenglu.com/wc250en007/archive/2012/07/07/182056.htmlLet me see seeLet me see seeSat, 07 Jul 2012 04:37:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/07/182056.htmlhttp://www.shnenglu.com/wc250en007/comments/182056.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/07/182056.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/182056.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/182056.html

出现q个问题的原因可能是有另外一个程序正在运行,D资源被锁不可用。而导致资源被锁的原因Q可能是上次安装时没正常完成Q而导致出现此状况?/p>

解决Ҏ(gu)Q输入以下命?/p>

sudo rm /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/lock

之后再安装想装的包,卛_解决

 

 

今天玩ubuntu的时候,在弄更新源的时候,H然出现以下错误Q?/p>

[1]+ Stopped                 sudo apt-get update
haiquan@haiquan-desktop:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the list directory

开始以为是权限不够Q就是用 sudo apt-get update,发现q是报错Q问题没有解冟뀂于是上|搜索了一下,{案如下Q?/p>

问题应该?span style="font-weight: bold; text-decoration: underline; font-style: italic;">之前那个更新被强制取消的问题Q进E仍然还?/span>。用q个命o查看一下:

ps -e | grep apt

昄l果如下Q?/p>

6362 ? 00:00:00 apt

6934 ? 00:00:00 apt-get

7368 ? 00:00:00 synaptic

use su to root:

root# kill 6362

root# kill 6934

root# kill 7368

再次在终端里查看ps -e | grep apt 没有Ml果?/p>

l箋执行sudo apt-get update

OKQ?/p>


http://blog.csdn.net/zyxlinux888/article/details/6358615



Let me see see 2012-07-07 12:37 发表评论
]]>
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?http://www.shnenglu.com/wc250en007/archive/2012/07/03/181265.htmlLet me see seeLet me see seeTue, 03 Jul 2012 08:42:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181265.htmlhttp://www.shnenglu.com/wc250en007/comments/181265.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181265.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/181265.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/181265.html所以首先确定没开两个APT-GETQ发现我已经开了新立得软g包管理器Q又在终端用apt-getQ关掉新立得软g包管理器。问题解冟?/p>

q有是可以删除Q重新配|?/p>

sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a



地址Q?a >http://blog.csdn.net/pfanaya/article/details/6695810

Let me see see 2012-07-03 16:42 发表评论
]]>
ubuntu中设|synergy自动开机启??http://www.shnenglu.com/wc250en007/archive/2012/07/03/181258.htmlLet me see seeLet me see seeTue, 03 Jul 2012 06:35:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181258.htmlhttp://www.shnenglu.com/wc250en007/comments/181258.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181258.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/181258.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/181258.html对于有两台PCQ一台WIN一台LINUXQ的用户来说Q?synergy是一个很好用的YӞ它可以让你两台机器共用一个键盘和一个鼠标?/p>


WIN里设|synergy自动启动很简单,但ubuntu里就会有点复杂。让两台机器开机时p动连接v来,用v来感觉就是同一台机器一P非常方便?/p>


下面来介l一下怎么让synergy自动开机启动?注意Q?q篇文章只针?ubuntu !! 其他发行版本的linux讄会有很大的不同?W者在ubuntu 10.4?1.4上都实践q,没有问题Q相信ubuntu的其他版本也能用上?/p>


1. ?/etc/gdm的目录下Q看?Init, PostLogin和PreSessions 三个子目录;

2. Init q个子目录下有个 Default 文gQ?里面的内Ҏ(gu)登录画面时的启动项Q?/p>

    PostLogin下也有个 Default文gQ里面的内容是管正在d时的启动,

    PreSessions下也有个Default文gQ里面的内容是管正在d时的启动,

    如果你发现没有Default文gQ只有一个Default.sample文g的话Q也是正常的QDefault.sample是给你作Z个模版来参考,让你知道怎么写Default文g。这U情况下Q你只要复制一下defaut.sample文gq命名为DefaultpQ或者直接将Default.sample改ؓDefault也行?/p>


3. 然后Q分别对q个三文件添加下面的内容Q?/p>

    在Init的Default里: 加上

/usr/bin/killall synergyc 
sleep 1
/usr/bin/synergyc [<options>] synergy-server-hostname

    在PostLogin的Default里:加上

/usr/bin/killall synergyc 
sleep 1 

    在PreSession的Default里:加上

/usr/bin/killall synergyc 
sleep 1 
/usr/bin/synergyc [<options>] 你要q的机器的IP(或它的计机?            

/* 例如我的L名叫 alvin-computer, ip?12.22.33.44,   那么q句应该q样?usr/bin/synergyc 12.22.33.44    ?usr/bin/synergyc alvin-computerQ至于那个option׃用管它了*/


(q些语句分别是啥意思,我就不详说了Q你懂的...Q?/p>

    分别保存Q退出,重启---------->大功告成Q!Q!


    用过synergy你就知道感觉是一个字Q?爽!

原文地址Q?a >http://blog.csdn.net/lihaoweiv/article/details/6608563



Let me see see 2012-07-03 14:35 发表评论
]]>
Ubuntu配置IP和DNShttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181229.htmlLet me see seeLet me see seeTue, 03 Jul 2012 02:48:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181229.htmlhttp://www.shnenglu.com/wc250en007/comments/181229.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181229.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/181229.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/181229.html首先讄IP

sudo vim /etc/network/interface

      其内容删除 加上以下内容

       auto lo

       iface lo inet loopback

#使用|卡0
       auto eth0

#使用静态IP
       iface eth0 inet 
static

       address 
192.168.0.168

       netmask 
255.255.255.0

       network 
192.168.0.0

       broadcast 
192.168.0.255

       gateway 
192.168.0.1



保存 然后修改DNS

sudo vim /etc/resolv.conf

       内容修改ؓ nameserver 202.103.24.68

保存 重启|络q接

sudo /etc/init.d/networking restart

 



Let me see see 2012-07-03 10:48 发表评论
]]>
ubuntu下执行sudo apt-get install出现E: Could not get lock /var/lib/dpkg/lockhttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181228.htmlLet me see seeLet me see seeTue, 03 Jul 2012 02:19:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181228.htmlhttp://www.shnenglu.com/wc250en007/comments/181228.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/03/181228.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/181228.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/181228.html 今天打算在ubuntu下安装个mysql的开发包Q谁知道在执行sudo apt-get  install libmysqlclient15-dev命o后,却出C如下错误信息Q?/p>
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

  刚开始以为是需要停止mysql服务Q于是停止mysql后执行sudo apt-get install libmysqlclient15-dev仍然出现q个错误Ql找原因发现Q我在执行sudo apt-get install libmysqlclient15-dev之前Q执行了sudo apt-get install gnomeQ而且该过E正在下载资源,{这个安装完后就可以了?/p>

Could not get lock /var/lib/dpkg/lock解决办法

  查下在执行sudo apt-get install的时候,之前的sudo apt-get install是否已经完成Q同一旉只能有一个sudo apt-get install在执行!



Let me see see 2012-07-03 10:19 发表评论
]]>
Windowsq_下虚拟UNIX环境http://www.shnenglu.com/wc250en007/archive/2012/07/02/181148.htmlLet me see seeLet me see seeMon, 02 Jul 2012 08:44:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/02/181148.htmlhttp://www.shnenglu.com/wc250en007/comments/181148.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/02/181148.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/181148.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/181148.htmlcygwin是一个在windowsq_上运行的unix模拟环境Q是cygnus solutions公司开发的自由软gQ该公司开发了很多好东西,著名的还有eCosQ不q现已被Redhat收购Q。它对于学习(fn)unix/linux操作环境Q或者从unix到windows?/span>应用E序ULQ或者进行某些特D的开发工作,其是用gnu工具集在windows上进?/span>嵌入式系l开?/a>Q非常有用。随着嵌入式系l开发在国内日渐行Q越来越多的开发者对cygwin产生了兴?br />

cygwin的工作机?/span>

  cygnus当初首先把gccQgdbQgas{开发工兯行了改进Q他们能够生成q解释win32的目标文件。然后,他们要把q些工具UL到windowsq_上去。一U方案是Zwin32 api对这些工L(fng)源代码进行大q修改,q样做显焉要大量工作。因此,他们采取了一U不同的Ҏ(gu)——他们写了一个共享库(是cygwin dll)Q把win32 api中没有的unix风格的调用(如fork,spawn,signals,select,sockets{)装在里面,也就是说Q他们基?win32 api写了一个unixpȝ库的模拟层。这P只要把这些工L(fng)源代码和q个׃n库连接到一P可以用unixL上的交叉~译器来生成可以?windowsq_上运行的工具集。以q些UL到windowsq_上的开发工具ؓ基础Qcygnus又逐步把其他的工具Q几乎不需要对源代码进行修改,只需要修改他们的配置脚本QY件移植到windows上来。这P在windowsq_上运行bash和开发工兗用户工P感觉好像在unix上工作?
启动 Cygwin 通常在 Cygwin安装位置Q 有一?nbsp;cygwin.bat 的程? 启动? 会进入Uninx控制?

此时q个控制台就可以输入Unix命o? 

首先, 输入 cd 
/cygdrive

然后输入 ls

此时应该能够看到你Windows下的所有盘W? q里cygwin映射了你的所有硬盘的盘符名字为对应的文g?




原文地址Q?a >http://baike.baidu.com/view/3968.htm


Let me see see 2012-07-02 16:44 发表评论
]]>
linux下vim命o详解http://www.shnenglu.com/wc250en007/archive/2012/06/28/180652.htmlLet me see seeLet me see seeThu, 28 Jun 2012 08:25:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180652.htmlhttp://www.shnenglu.com/wc250en007/comments/180652.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180652.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/180652.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/180652.html阅读全文

Let me see see 2012-06-28 16:25 发表评论
]]>
Ubuntu中如何查看自w的IP地址http://www.shnenglu.com/wc250en007/archive/2012/06/28/180646.htmlLet me see seeLet me see seeThu, 28 Jun 2012 07:37:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180646.htmlhttp://www.shnenglu.com/wc250en007/comments/180646.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180646.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/180646.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/180646.html大家都知道在Windows中查看自qIP可以通过在命令行中输?ipconfig /all"的方式进行,但是q种Ҏ(gu)在以UbuntuZ表的Linux中是无法q行的,那么应该采用什么方式呢Q?/span>

  其实也很单,打开l端Q在命o行中输入ifconfigQ回车后׃出现在windows中的ipconfigq乎相同的结果,甚至比windows昄的还要全面,如下图所C:

   

  需要说明的是,eth0和eth1分别代表了两块网卡,以我使用的机器DELL D600ZQeth0代表Broadcom 5705千兆|卡Qeth1则表CZؓIntel wireless 2200无线|卡?br />


Let me see see 2012-06-28 15:37 发表评论
]]>
Ubuntu 查看和杀死进E?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/06/28/180644.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Thu, 28 Jun 2012 07:29:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/06/28/180644.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/180644.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/06/28/180644.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/180644.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/180644.html</trackback:ping><description><![CDATA[<div style="widows: 2; text-transform: none; text-indent: 0px; font: bold 14px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; margin-bottom: 10px; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><a style="color: rgb(26,139,200); text-decoration: none" id="viewpost1_TitleUrl" >Ubuntu 查看和杀死进E?/a></div><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">今天在netbeans中关闭webrick?发现没有关闭?打入localhost:3000 依然昄面,发现无法从nb中再ơ关?/span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">只有q入ubuntu的进E下关闭</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">查看q程:</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1,ps -e 命o </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2,feng@feng:~$ sudo netstat -antup</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Active Internet connections (servers and established)</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      4672/cupsd      </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN      7082/ruby       </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:41121     66.113.164.119:80       ESTABLISHED 5709/firefox    </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:44746     209.85.201.125:5222     ESTABLISHED 6130/pidgin     </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:54797     192.168.1.128:3306      ESTABLISHED 7082/ruby       </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:43466     64.4.34.77:1863         ESTABLISHED 6130/pidgin     </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:41999     64.233.189.19:443       ESTABLISHED 5709/firefox    </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:54900     58.251.60.53:80         ESTABLISHED 6130/pidgin     </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp        0      0 192.168.1.102:34180     220.181.37.210:80       TIME_WAIT   -               </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tcp6       0      0 ::1:42801               :::*                    LISTEN      6863/java       </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">udp        0      0 0.0.0.0:68              0.0.0.0:*                           5161/dhclient   </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">udp        0      0 0.0.0.0:5353            0.0.0.0:*                           4625/avahi-daemon: </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">udp        0      0 0.0.0.0:56699           0.0.0.0:*                           4625/avahi-daemon: </span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">杀死webrick的进E?</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">feng@feng:~$ sudo kill 7082</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2法:</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(79,129,189); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">譬如</span><span style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(79,129,189); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Firefox</span><span style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(79,129,189); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">现在僉|Q无法相应请求。打开一个终端,输入Q?/span> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">pgrep firefox</span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">会返回数|譬如?/span><span style="color: rgb(79,129,189)">7198.</span><span style="color: rgb(79,129,189)">现在输入Q?/span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">kill 7198</span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">׃杀?/span><span style="color: rgb(79,129,189)">Firefox</span><span style="color: rgb(79,129,189)">q程了?/span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">你也可以使用</span><span style="color: rgb(79,129,189)">killall</span><span style="color: rgb(79,129,189)">命o?/span><span style="color: rgb(79,129,189)">killall</span><span style="color: rgb(79,129,189)">可以使用E序的名Uͼ譬如输入Q?/span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">killall firefox</span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><br /></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">3?/span></p> <p style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" align="left"><span style="color: rgb(79,129,189)">如果前两者还是杀不死Q用 kill -9 pid 命o,来绝杀<br /></span></p><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ref:</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">http://hi.baidu.com/lidongxing1005/blog/item/63c65dec28dfae4779f05566.html</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">http://hi.baidu.com/camark/blog/item/fb918dca3e237981c81768e6.html</span><br style="widows: 2; text-transform: none; text-indent: 0px; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(75,75,75); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">http://hi.baidu.com/strive_boy/blog/item/d3020b1865efd6b14aedbcd2.html</span><img src ="http://www.shnenglu.com/wc250en007/aggbug/180644.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-06-28 15:29 <a href="http://www.shnenglu.com/wc250en007/archive/2012/06/28/180644.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Subversion命o汇??http://www.shnenglu.com/wc250en007/archive/2012/06/28/180643.htmlLet me see seeLet me see seeThu, 28 Jun 2012 06:51:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180643.htmlhttp://www.shnenglu.com/wc250en007/comments/180643.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180643.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/180643.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/180643.html

svn 命o共同的选项

--targets list dlistq将其解释ؓ一个将要操作的参数列表

--non-recurisive, –N 只操作单个目录,不处理子目录

--verbose, –v 打印额外的信?/p>

--quiet, –q 打印的信息尽可能?/p>

--username,  name 指定在连接授权时使用的用户名

--password, pawd 指定要用的密码

--no-auth-cache 不要~存w䆾令牌

--non-interactive 不要提示输入额外的信?/p>

--config-dir  dir  从dird用户配置

--editor-cm cmd 使用cmd作ؓ日志消息的编辑器

svn add

把文件及目录的名U添加给版本控制pȝ。他们会在下ơ提交时被添加到目仓库

svn add path

--auto-props 在添加他们的时候自动设|文件的属?/p>

--no-auto-props 用自动属性设|?/p>

svn blame

昄文g每行的版本及作者信?/p>

--revision, –r rev 如果指定的rev是单个版本,昄该版本作者信息。如果是范围rev1:rev2, 昄rev2版本作者的信息Q但只检查版本到rev1.

svn cat

输出指定文g或者URL的内?/p>

svn cat target…

--revision, –r rev

svn checkout

从项目仓库牵Z个工作拷?/p>

svn checkout url…path

如果没有指定path,{և的本地目录名使用URL的base name.

svn cleanup

清理工作拯Q移除锁Q完成未完成的操作,{等?/p>

svn cleanup path…

svn commit path

把改动从你的工作拯发送到目仓库

--message, –m msg 使用msg作ؓ提交日志消息?/p>

--file, –F file 使用file的内容作为提交日志消息?/p>

--no-unlock 不要在提交的时候释N?/p>

svn copy

在工作拷贝或者项目仓库中刉包括历史在内的复本

svn copy src dest

src和dest可以是工作拷?WC)的\径或者URL.

src dest 效果……

WC WC 拯q添?/p>

WC URL 立即提交WC的拷贝到URL

URL WC {ևURL到WC, d

URL URL 完全服务器端拯Q用于制作分支和打标{?/p>

--revision, –r rev要拷贝的src的版本。只在src是项目仓库的URL时才有意义?/p>

svn delete target

从项目仓库删除文件或者目录。如果target是工作拷贝中的文件或者目录,它被从工作拷贝中U除q且预计在下ơ提交时删除掉。如果target是项目仓库URL,通过一ơ立即的提交从项目仓库中删除?/p>

--message, –m msg

--file, –F file

svn diff

昄两个路径之间的差?/p>

svn diff –r rev1:rev2 target…

svn diff oldurl newurl

svn export

创徏一个无版本记录的拷?

svn export –r rev URL path

从项目仓库的指定URL导出一个干净的目录树(wi)到path中,如果指定了rev参数Q导出rev版本的,否则到处最新版本?/p>

svn import

提交一个无版本的文件或者树(wi)到项目仓?/p>

svn import path URL

svn info

昄文g或者目录的信息?/p>

svn list

列出目仓库中的目录条数?/p>

svn lock

锁住文g让其它用户不能提交改动?/p>

svn lock target

--message, –m msg 使用msg作ؓ锁信息消?/p>

--force 强制加锁成功Q通过从其他用h者工作拷贝把锁给偯来?/p>

svn log

昄一些版本或者文件的日志消息.

--stop-on-copy 在遍历历史的时候不要穿拷贝(对于查找分支的v点很有用Q?/p>

svn merge

把两个来源的差异应用l工作拷贝\径?/p>

svn merge –r rev1:rev2  source wcpath

svn mkdir

创徏版本控制下的新目?/p>

svn mkdir target

svn move src dest

Ud或者重命名工作拯或者项目仓库中文g或者目录?/p>

--revision, –r rev使用版本rev作ؓ源来执行q次Ud?/p>

svn propdel

删除文g或者目录的属?/p>

svn propdel propname path…

svn propedit

~辑文g或者目录的属?/p>

svn propedit propname path…

svn propget

打印文g或者目录的属性?/p>

svn propget propname path…

--strict 用额外的换行和其它的美化措施(在把二进制属性重定向到文件时会有用处)

svn proplist

列出文g或者目录的所有属?/p>

--verbose

--recursive

--revision, –r rev 列出path在版本rev定义的属?/p>

svn propset(pset, ps)

svn propset propname propval path…

--file, –F file dfile的内容,使用它作为属性?

--recursive

--encoding  enc 把g为用enc~码的字W集

svn resolved

U除工作拯文g或者目录的冲突状?/p>

--recursive

svn revert

恢复工作拯的文Ӟ撤销最新的本地修改Q?/p>

svn revert path q个命o不需要网l连?/p>

--recursive

svn status

打印工作拯中文件或者目录的状?/p>

svn status path…

--show-updates, –u 联系服务器显C更C?/p>

--no-ignore 忽视默认讄和svn:ignore属性设|的忽略?/p>

--non-recursive, –N

--verbose, –v

svn switch

把工作拷贝{向到其他的URL

svn switch URL path

更新工作拯让其使用目仓库的新URL.q个行ؓcMsvn update 而且是一U把工作拯转向到同一目仓库中的分支或者标{办法?/p>

--revision, –r rev 转向到版本rev

--non-recursive, –N

--diff3-cm 使用cmd作ؓ合ƈ命o

svn unlock

解开工作拯文g或者项目仓库URL的锁?/p>

svn unlock target…

--force 砸坏现有对target的锁Q甚臛_不是被当前工作拷贝所拥有的?/p>

svn update

把改动从目仓库带到工作拯来?/p>

svn update path…

--revision, –r rev 更新到版本rev

--non-recrusive, –N

--diff3-cmd

作? 王d?br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />出处Qhttp://www.cnblogs.com/cnblogsfans
版权Q本文版权归作者和博客园共?转蝲需l作者同意?/span>


Let me see see 2012-06-28 14:51 发表评论
]]>
ubuntupȝ下关于环境变量的修改(?http://www.shnenglu.com/wc250en007/archive/2012/06/28/180642.htmlLet me see seeLet me see seeThu, 28 Jun 2012 06:50:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180642.htmlhttp://www.shnenglu.com/wc250en007/comments/180642.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/28/180642.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/180642.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/180642.html环境变量分ؓpȝ环境变量和用L(fng)境变?/span>

 

Ubuntu下查看环境变量:

 

查看当前环境变量命o为:env  

当然可以查看某一个模块的配置信息Q比如要查看elipse的配|?可以用执行:env | grep eclipse  

 

有如下输出:

 

OLDPWD=/home/runner/eclipse

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/:$~/eclipse

 

查看当前Shell的环境变量:~$ echo $PATH      # 昄当前环境变量

 

~$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/:$~/eclipse

 

pȝ环境变量Q?/span>

/etc/profileQ此文g为系l的每个用户讄环境信息Q当用户dӞ该文件被执行。ƈ?etc/profile.d目录的配|文件中搜集shell的设|?/p>

/etc/bashrcQؓ每一个运行bash shell的用h行此文g。当bash shell被打开Ӟ该文件被d?/p>


当前用户变量Q?/span>

~/.bashrcQ该文g包含专用于你的bash shell的bash信息Q当d时以及每ơ打开新的shellӞ该该文g被读取?/span>


Ubuntu下设|环境变量:


1. ?span style="line-height: 22px; font-size: 15px">Ҏ(gu)只在一个终端中生效Q另外打开新的l端发现PATHq是原来的PATH

~$ echo $PATH      # 昄当前环境变量Q也是昄/etc/environment文gQ?br style="line-height: 22px" />/usr/local/sbin:/usr/local/bin    # 昄举例Q多个\径中间用“:”隔开
~$ PATH="$PATH:/home/workdir"    # d“/home/workdir”目录
/usr/local/sbin:/usr/local/bin:/home/workdir   # 昄举例Q多个\径中间仍?#8220;:”隔开

则添加成功!Q最后当然可以重启或者输Z其即时生效:Q?br style="line-height: 22px" />~$ export PATH
~$ cd    #执行cd命o后面什么都不加Q可以回到当前登录用L(fng)宿主目录
~$ source .bashrc     #该命令需在主目录下才能运行,否则提示找不?bashrc命o
l束Q?/p>

2.  该方法全局有效

     当然也可以之间打开/etc/environment文gQ来q行修改

  ? gedit  /etc/environment 

  然后d你想d的\径,中间?:" 分割

3. ׃看不懂~/.bashrc 文g怎么配置的环境变量,所以就不知C。不介绍



Let me see see 2012-06-28 14:50 发表评论
]]>
Linux下Makefile的automake生成全攻??http://www.shnenglu.com/wc250en007/archive/2012/06/27/180478.htmlLet me see seeLet me see seeWed, 27 Jun 2012 06:19:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/27/180478.htmlhttp://www.shnenglu.com/wc250en007/comments/180478.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/27/180478.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/180478.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/180478.html作ؓLinux下的E序开发h员,大家一定都遇到qMakefileQ用make命o来编译自己写的程序确实是很方ѝ一般情况下Q大安是手工写一个简单MakefileQ如果要惛_Z个符合自pY件惯例的Makefile׃那么Ҏ(gu)了?
autoconf和automake两个工具来帮助我们自动地生成W合自由软g惯例的MakefileQ这样就可以象常见的GNUE序一P只要使用“./configure”Q?#8220;make”Q?#8220;make instal”可以把E序安装到Linuxpȝ中去了。这特别适合惛_开放源代码软g的程序开发h员,又或如果你只是自己写些小的ToyE序Q那么这个文章对你也会有很大的帮助?/p>

一、Makefile介绍

  Makefile是用于自动编译和链接的,一个工E有很多文gl成Q每一个文件的改变都会D工程的重新链接,但是不是所有的文g都需要重新编译,Makefile中纪录有文g的信息,在make时会军_在链接的时候需要重新编译哪些文件?/p>

  Makefile的宗旨就是:让编译器知道要编译一个文仉要依赖其他的哪些文g。当那些依赖文g有了改变Q编译器会自动的发现最l的生成文g已经q时Q而重新编译相应的模块?/p>

  Makefile的基本结构不是很复杂Q但当一个程序开发h员开始写MakefileӞl常会怀疑自己写的是否符合惯例,而且自己写的Makefilel常和自q开发环境相兌Q当pȝ环境变量或\径发生了变化后,Makefile可能q要跟着修改。这样就造成了手工书写Makefile的诸多问题,automake恰好能很好地帮助我们解决q些问题?/p>

  使用automakeQ程序开发h员只需要写一些简单的含有预定义宏的文Ӟ由autoconfҎ(gu)一个宏文g生成configureQ由automakeҎ(gu)另一个宏文g生成Makefile.inQ再使用configure依据Makefile.in来生成一个符合惯例的Makefile。下面我们将详细介绍Makefile的automake生成Ҏ(gu)?/p>

  二、用的环境

  本文所提到的程序是ZLinux发行版本QFedora Core release 1Q它包含了我们要用到的autoconfQautomake?/p>

  三、从helloworld入手

  我们从大家最怋用的例子E序helloworld开始?/p>

  下面的过E如果简单地说来是Q?/p>

  新徏三个文gQ?/p>

   helloworld.c
   configure.in
   Makefile.am

  然后执行Q?/p>

aclocal; autoconf; automake --add-missing; ./configure; make; ./helloworld

 

     可以看到Makefile被生出来,而且可以helloworld.c~译通过?/p>

  很简单吧Q几条命令就可以做出一个符合惯例的MakefileQ感觉如何呀?/p>

  现在开始介l详l的q程Q?/p>

  1、徏目录

  在你的工作目录下Z个helloworld目录Q我们用它来存放helloworldE序及相xӞ如在/home/my/build下:

     

$ mkdir helloword
$ cd helloworld


2?helloworld.c

  然后用你自己最喜欢的编辑器写一个hellowrold.c文gQ如命oQvi helloworld.c。用下面的代码作ؓhelloworld.c的内宏V?/p>

 

int main(int argc, char** argv)
{
printf(
"Hello, Linux World!\n");
return 0;
}


  完成后保存退出?/p>

  现在在helloworld目录下就应该有一个你自己写的helloworld.c了?/p>

3、生成configure

  我们使用autoscan命o来帮助我们根据目录下的源代码生成一个configure.in的模板文件?  命oQ?/p>

$ autoscan
$ ls
configure.scan helloworld.c

 

      执行后在hellowrold目录下会生成一个文Ӟconfigure.scanQ我们可以拿它作为configure.in的蓝本?/p>

  现在configure.scan改名为configure.inQ?mv命o重命?mv configure.scan configure.in)q且~辑它,按下面的内容修改Q去掉无关的语句Q?/p>

 

============================configure.in内容开?/span>=========================================
-*- Autoconf -*-
# Process 
this file with autoconf to produce a configure script.

AC_INIT(helloworld.c)
AM_INIT_AUTOMAKE(helloworld, 1.0)

# Checks 
for programs.
AC_PROG_CC

# Checks 
for libraries.

# Checks 
for header files.

# Checks 
for typedefs, structures, and compiler characteristics.

# Checks 
for library functions.
AC_OUTPUT(Makefile)
============================configure.in内容l束=========================================

然后执行命oaclocal和autoconfQ?strong>分别会生aclocal.m4及configure两个文gQ?/p>

$ aclocal 
$ls 
aclocal.m4 configure.
in helloworld.c 
$ autoconf 
$ ls 
aclocal.m4 autom4te.cache configure configure.
in helloworld.c

 

     大家可以看到configure.in内容是一些宏定义Q这些宏lautoconf处理后会变成查系l特性、环境变量、Y件必ȝ参数的shell脚本?/p>

  autoconf 是用来生成自动配|Y件源代码脚本QconfigureQ的工具。configure脚本能独立于autoconfq行Q且在运行的q程中,不需要用L(fng)q预?/p>

  要生成configure文gQ你必须告诉autoconf如何扑ֈ你所用的宏。方式是使用aclocalE序来生成你的aclocal.m4?/p>

  aclocalҎ(gu)configure.in文g的内容,自动生成aclocal.m4文g。aclocal是一个perl 脚本E序Q它的定义是Q?#8220;aclocal - create aclocal.m4 by scanning configure.ac”?/p>

  autoconf从configure.inq个列D~译软g时所需要各U参数的模板文g中创建configure?/p>

  autoconf需要GNU m4宏处理器来处理aclocal.m4Q生成configure脚本?/p>

  m4是一个宏处理器。将输入拯到输出,同时宏展开。宏可以是内嵌的Q也可以是用户定义的。除了可以展开宏,m4q有一些内建的函数Q用来引用文Ӟ执行命oQ整数运,文本操作Q@环等。m4既可以作为编译器的前端,也可以单独作Z个宏处理器?/p>


 

4、新建Makefile.am

  新徏Makefile.am文gQ命令:

 

$ vi Makefile.am

内容如下:

AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS
=helloworld
helloworld_SOURCES
=helloworld.c

      automake会根据你写的Makefile.am来自动生成Makefile.in?/p>

  Makefile.am中定义的宏和目标,会指导automake生成指定的代码。例如,宏bin_PROGRAMS导致编译和q接的目标被生成?/p>

5、运行automake

  命oQ?/p>

    使用automake对其生成“configure.in”文gQ在q里使用选项“—adding-missing”可以让automake自动d有一些必需的脚本文件?/span>

$ automake --add-missing
configure.
in: installing `./install-sh'
configure.in: installing `./mkinstalldirs'
configure.in: installing `./missing'
Makefile.am: installing `./depcomp'

    automake会根据Makefile.am文g产生一些文Ӟ包含最重要的Makefile.in?/p>

6、执行configure生成Makefile,在这一步中Q通过q行自动配置讄文gconfigureQ把Makefile.in变成了最l的Makefile?/span>


.
/configure 
checking 
for a BSD-compatible install /usr/bin/install -c
checking whether build environment 
is sane yes
checking 
for gawk gawk
checking whether make sets $(MAKE) yes
checking 
for gcc gcc
checking 
for C compiler default output a.out
checking whether the C compiler works yes
checking whether we are cross compiling no
checking 
for suffix of executables 
checking 
for suffix of object files o
checking whether we are 
using the GNU C compiler yes
checking whether gcc accepts 
-g yes
checking 
for gcc option to accept ANSI C none needed
checking 
for style of include used by make GNU
checking dependency style of gcc gcc3
configure: creating .
/config.status
config.status: creating Makefile
config.status: executing depfiles commands
$ ls 
-l Makefile
-rw-rw-r-- 1 yutao yutao 15035 Oct 15 10:40 Makefile

    你可以看刎ͼ此时Makefile已经产生出来了?/p>

7、用Makefile~译代码

$ make
if gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -

DPACKAGE_STRING
="" -DPACKAGE_BUGREPORT="" -DPACKAGE="helloworld" -DVERSION="1.0" 

-I. -I. --O2 -MT helloworld.o -MD -MP -MF ".deps/helloworld.Tpo" \
--o helloworld.o `test -'helloworld.c' || echo './'`helloworld.c; \
then mv 
-".deps/helloworld.Tpo" ".deps/helloworld.Po"; \
else rm -".deps/helloworld.Tpo"; exit 1; \
fi
gcc 
--O2 -o helloworld helloworld.o

q行helloworld


$ .
/helloworld 
Hello, Linux World
!

q样helloworldq译出来了Q你如果按上面的步骤来做的话Q应该也会很Ҏ(gu)地编译出正确的helloworld文g。你q可以试着使用一些其他的make命oQ如make cleanQmake installQmake distQ看看它们会l你什么样的效果?br />

 四、深入浅?/p>

  针对上面提到的各个命令,我们再做些详l的介绍?/p>

  1?autoscan

  autoscan是用来扫描源代码目录生成configure.scan文g的。autoscan可以用目录名做ؓ参数Q但如果你不使用参数的话Q那么autoscan认Z用的是当前目录。autoscan扫描你所指定目录中的源文Ӟq创建configure.scan文g?/p>

  2?configure.scan

  configure.scan包含?br /> 
      pȝ配置的基本选项Q里面都是一些宏定义。我们需要将它改名ؓconfigure.in

  3?aclocal

  aclocal是一个perl 脚本E序。aclocalҎ(gu)configure.in文g的内容,自动生成aclocal.m4文g。aclocal的定义是Q?#8220;aclocal - create aclocal.m4 by scanning configure.ac”?/p>

  4?autoconf

  autoconf是用来生configure文g的。configure是一个脚本,它能讄源程序来适应各种不同的操作系l^収ͼq且Ҏ(gu)不同的系l来产生合适的MakefileQ从而可以你的源代码能在不同的操作pȝq_上被~译出来?/p>

  configure.in文g的内Ҏ(gu)一些宏Q这些宏l过autoconf 处理后会变成查系l特性、环境变量、Y件必ȝ参数的shell脚本。configure.in文g中的宏的序q没有规定,但是你必d所有宏的最前面和最后面分别加上AC_INIT宏和AC_OUTPUT宏?/p>

  在configure.ini中:

  #可C注释,q个宏后面的内容被忽略?/p>

  AC_INIT(FILE)

  q个宏用来检查源代码所在的路径?/p>

AM_INIT_AUTOMAKE(PACKAGE, VERSION)

     q个宏是必须的,它描qC我们要生成的Y件包的名字及其版本号QPACKAGE是Y件包的名字,VERSION是版本号。当你用make dist命oӞ它会l你生成一个类似helloworld-1.0.tar.gz的Y件发行包Q其中就有对应的软g包的名字和版本号?/p>

AC_PROG_CC

  q个宏将查系l所用的C~译器?

AC_OUTPUT(FILE)

  q个宏是我们要输出的Makefile的名字?/p>

  我们在用automakeӞ实际上还需要用到其他的一些宏Q但我们可以用aclocal 来帮我们自动产生。执行aclocal后我们会得到aclocal.m4文g?/p>

  产生了configure.in和aclocal.m4 两个宏文件后Q我们就可以使用autoconf来生configure文g了?/p>

  5?Makefile.am

  Makefile.am是用来生成Makefile.in的,需要你手工书写。Makefile.am中定义了一些内容:

AUTOMAKE_OPTIONS

  q个是automake的选项。在执行automakeӞ它会查目录下是否存在标准GNU软g包中应具备的各种文gQ例如AUTHORS、ChangeLog、NEWS{文件。我们将其设|成foreignӞautomake会改用一般Y件包的标准来查?/p>

bin_PROGRAMS

  q个是指定我们所要生的可执行文件的文g名。如果你要生多个可执行文gQ那么在各个名字间用I格隔开?

helloworld_SOURCES

  q个是指定?#8220;helloworld”时所需要的源代码。如果它用到了多个源文gQ那么请使用I格W号它们隔开。比如需要helloworld.hQhelloworld.c那么请写成helloworld_SOURCES= helloworld.h helloworld.c?/p>

  如果你在bin_PROGRAMS定义了多个可执行文gQ则对应每个可执行文仉要定义相对的filename_SOURCES?/p>

  6?automake

  我们使用automake --add-missing来生Makefile.in?/p>

  选项--add-missing的定义是“add missing standard files to package”Q它会让automake加入一个标准的软g包所必须的一些文件?/p>

  我们用automake产生出来的Makefile.in文g是符合GNU Makefile惯例的,接下来我们只要执行configureq个shell 脚本可以生合适的 Makefile 文g了?/p>

  7?Makefile

  在符合GNU Makefiel惯例的Makefile中,包含了一些基本的预先定义的操作:

make

  Ҏ(gu)Makefile~译源代码,q接Q生成目标文Ӟ可执行文件?/p>

make clean

  清除上次的make命o所产生的object文gQ后~?#8220;.o”的文Ӟ及可执行文g?/p>

make install

  编译成功的可执行文件安装到pȝ目录中,一般ؓ/usr/local/bin目录?/p>

make dist

  产生发布软g包文Ӟ即distribution packageQ。这个命令将会将可执行文件及相关文g打包成一个tar.gz压羃的文件用来作为发布Y件的软g包?/p>

  它会在当前目录下生成一个名字类?#8220;PACKAGE-VERSION.tar.gz”的文件。PACKAGE和VERSIONQ是我们在configure.in中定义的AM_INIT_AUTOMAKE(PACKAGE, VERSION)?/p>

make distcheck

  生成发布软g包ƈ对其q行试查,以确定发布包的正性。这个操作将自动把压~包文g解开Q然后执行configure命oQƈ且执行makeQ来认~译不出现错误,最后提CZ软g包已l准备好Q可以发布了?/p>

===============================================
helloworld
-1.0.tar.gz is ready for distribution
===============================================
make distclean

  cMmake cleanQ但同时也将configure生成的文件全部删除掉Q包括Makefile?/p>

  五、结束语

  通过上面的介l,你应该可以很Ҏ(gu)地生成一个你自己的符合GNU惯例的Makefile文g及对应的目文g?/p>

  如果你想写出更复杂的且符合惯例的MakefileQ你可以参考一些开放代码的目中的configure.in和Makefile.am文gQ比如:嵌入式数据库sqliteQ单元测试cppunit?/p>

 




Let me see see 2012-06-27 14:19 发表评论
]]>
Linux makefile 教程(?http://www.shnenglu.com/wc250en007/archive/2012/06/19/179392.htmlLet me see seeLet me see seeTue, 19 Jun 2012 03:49:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/19/179392.htmlhttp://www.shnenglu.com/wc250en007/comments/179392.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/19/179392.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/179392.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/179392.html阅读全文

Let me see see 2012-06-19 11:49 发表评论
]]>
Makefile实例http://www.shnenglu.com/wc250en007/archive/2012/06/19/179388.htmlLet me see seeLet me see seeTue, 19 Jun 2012 03:39:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/19/179388.htmlhttp://www.shnenglu.com/wc250en007/comments/179388.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/19/179388.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/179388.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/179388.html阅读全文

Let me see see 2012-06-19 11:39 发表评论
]]>
linux 常用命o全集http://www.shnenglu.com/wc250en007/archive/2012/06/19/179387.htmlLet me see seeLet me see seeTue, 19 Jun 2012 02:56:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/06/19/179387.htmlhttp://www.shnenglu.com/wc250en007/comments/179387.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/06/19/179387.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/179387.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/179387.htmlhttp://linux.chinaitlab.com/special/linuxcom/


1.ctrl+z文件置为后台运?fgq行到前?br />

Let me see see 2012-06-19 10:56 发表评论
]]>
Ubuntu~程环境搭徏http://www.shnenglu.com/wc250en007/archive/2012/04/15/171446.htmlLet me see seeLet me see seeSun, 15 Apr 2012 02:12:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/04/15/171446.htmlhttp://www.shnenglu.com/wc250en007/comments/171446.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/04/15/171446.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/171446.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/171446.htmlW一Q按照下面网늚提示来添加新的Y件源Q?/p>

http://wiki.ubuntu.org.cn/%E6%B7%BB%E5%8A%A0%E5%85%B6%E4%BB%96%E8%BD%AF%E4%BB%B6%E5%BA%93

注意d源的时候,可以使用ping来测试源的速度Q尽量选择较快的源?/p>

我的操作如下Q?/p>

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup     //原文g备䆾一?
sudo gedit /etc/apt/sources.list      //~辑d新的?/pre>
注意选择源要对应相应的版本,我的版本?.06Q所以选择下面一个源Q?/pre>
deb http://ubuntu.cn99.com/ubuntu/ dapper main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ dapper main restricted universe multiverse

保持文gq更?/p>

sudo apt-get update

W二步,安装build-essential

sudo apt-get install build-essential
安装完成后写一个C语言E序testc.c试一下?span class="Apple-converted-space"> 

代码:

#include<stdio.h> 
int main() 
{ 
     printf("Hello Ubuntu!\n"); 
     return 0; 
} 



代码:

$ gcc testc.c -o testc 
$ ./testc 



 
Hello Ubuntu! 
q样QC语言~译器就安装成功了; 

W三步、安装GTK环境 

安装GTK环境只要安装一个gnome-core-devel可以了Q里面集成了很多其他的包。除此之外还要{一些其他的东西Q如libglib2.0-doc、libgtk2.0-doc帮助文档Qdevhelp帮助文档查看Qglade-gnome、glade-common、glade-doc囑Ş界面设计{?span class="Apple-converted-space"> 

代码:

sudo apt-get install gnome-core-devel 
sudo apt-get install libglib2.0-doc libgtk2.0-doc 
sudo apt-get install devhelp 
sudo apt-get install glade-gnome glade-common glade-doc 



安装完成后我们也同样做个试E序 

代码:

#include<gtk/gtk.h> 
void hello(GtkWidget *widget,gpointer data) 
{ 
g_print("Hello Ubuntu!\n"); 
} 
gint delete_event(GtkWidget *widget,GdkEvent *event,gpointer data) 
{ 
g_print ("delete event occurred\n"); 
return(TRUE); 
} 
void destroy(GtkWidget *widget,gpointer data) 
{ 
gtk_main_quit(); 
} 
int main( int argc, char *argv[] ) 
{ 
GtkWidget *window; 
GtkWidget *button; 
gtk_init (&argc, &argv); 
window=gtk_window_new (GTK_WINDOW_TOPLEVEL); 
gtk_signal_connect (GTK_OBJECT(window),"delete_event",GTK_SIGNAL_FUNC(delete_event),NULL); 
gtk_signal_connect (GTK_OBJECT (window), "destroy",GTK_SIGNAL_FUNC (destroy), NULL); 
gtk_container_set_border_width (GTK_CONTAINER (window), 10); 
button = gtk_button_new_with_label ("Hello Ubuntu!"); 
gtk_signal_connect (GTK_OBJECT (button), "clicked",GTK_SIGNAL_FUNC (hello), NULL); 
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",GTK_SIGNAL_FUNC (gtk_widget_destroy),GTK_OBJECT (window)); 
gtk_container_add (GTK_CONTAINER (window), button); 
gtk_widget_show (button); 
gtk_widget_show (window);     /*昄一个窗?/ 
gtk_main();     /*q入d@?/ 
return(0); 
} 



用下面命令编译运?span class="Apple-converted-space"> 

代码:

$ gcc gtkhello.c -o gtktest `pkg-config --cflags --libs gtk+-2.0` 
$ ./gtktest 


会显CZ个带有一个按钮的H口Q点L钮以后窗口关闭,命o行显CHello Ubuntu! 

W四步、安装Qt

QT我安装了 
libqt4-core 
qt4-designer 
qt4-dev-tools 
qt4-qtconfig 
libqt4-dev 
libqt4-gui libqt4-debug 
libqt4-sql 

q个我还没有怎么用过Q在新立得里面搜索QT4Q看着差不多的都装上了?span class="Apple-converted-space"> 

5安装一个IDE 
Linux里面有个一个很适合初学者用的C CQ+的IDE 叫GeanyQ在菜单“应用E序”->“d删除E序”Q在里面program里找一下就可以了?/font>



Let me see see 2012-04-15 10:12 发表评论
]]>vim pȝ剪切?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/04/15/171445.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Sun, 15 Apr 2012 02:04:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/04/15/171445.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/171445.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/04/15/171445.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/171445.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/171445.html</trackback:ping><description><![CDATA[<span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1.Shift+InsertQ将pȝ中的剪脓(chung)板上的内容粘贴到vim?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2.VIMh多个剪切板,":reg"命o查看各剪切板。系l剪切板的编号就?+?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">3.vi的粘贴指令是"p"Q但是如果要_脓(chung)一个特定的剪脓(chung)板,只是用p׃行了。先按ESCQ退出编辑模式,然后依次?+pq三个字W。这是把+剪脓(chung)板的内容_脓(chung)q来?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">dQ?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">map <c-c> "+y</span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">map <c-v> "+p</span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">到vimrc中,可以方便的ctrl c ,ctrl y 了?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">系l剪贴板的内Ҏ(gu)贝进VIM的操作是Q?在Insert模式?Shift+Insert, 或Insert模式?鼠标中键</span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">但是反过来就有点困难Q?因ؓl端下的VIM没有pȝ剪脓(chung)板,在寻扑֑令无果后?我找C一个勉强可以的办法?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; display: inline !important; font: 12px/18px arial; white-space: normal; orphans: 2; float: none; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">在vim中的命o行输?set mouse=v Q?然后可以用鼠标选择q右键弹单复Ӟ或者Ctrl+Shift+c复制Q缺Ҏ(gu)一定要用鼠标?/span><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /> <div style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; word-wrap: break-word; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2?4?/div> <h4 style="line-height: 18px; widows: 2; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; letter-spacing: normal; font-family: arial; white-space: normal; orphans: 2; color: rgb(154,154,154); font-size: 12px; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="beTitle">vim 复制_脓(chung)到剪贴板</h4> <div style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; font: 12px/18px arial; word-wrap: break-word; white-space: normal; orphans: 2; color: rgb(154,154,154); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="bvMsg">_脓(chung)Q?shirt + Insert<br />复制 : ~/.vimrc 增加一?map ^C ctrl + c<br />其中^C q样输入Q?先按ctrl+v, 再按ctrl+c</div><img src ="http://www.shnenglu.com/wc250en007/aggbug/171445.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-04-15 10:04 <a href="http://www.shnenglu.com/wc250en007/archive/2012/04/15/171445.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Ubuntu下徏立C/C++~程环境(C和C++的编译是不一L(fng))http://www.shnenglu.com/wc250en007/archive/2012/04/15/171438.htmlLet me see seeLet me see seeSun, 15 Apr 2012 00:04:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/04/15/171438.htmlhttp://www.shnenglu.com/wc250en007/comments/171438.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/04/15/171438.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/171438.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/171438.html刚刚装好?a style="color: blue; text-decoration: underline" title="Ubuntu" >UbuntuQ是自带Gcc的,但是׃~Z必要的头文gQ不能顺利编译C和C++源程?br />比如有以下源E序Q?br />#include <stdio.h>
int main()
{
printf("HelloWorld\n");
return 0;
}
在终端编译时会提C找不到文g“stdio.h”QC++源文件也是如?/p>

要解决问题,需要一个build-essential


在新立得软g包管理器中搜索build-essentialQ安装就可以?/span>

C和C++的源文g都可以命名ؓ*.cQ不q在~译的时候要正确选择命o
如上面写的程序命名ؓmy.cQ放在桌面上
在终端中输入Q?br />gcc /Desktop/my.c -o res
./res
~译生成可执行文件resq执?/p>

假如源程序是按照C++的语法标准编写的Q?a style="color: blue; text-decoration: underline" >http://ubuntuone.cn则应该执行:
g++ [目录名] -o [可执行文件名]
./[可执行文件名]
你可以自p试一下下面的源程序:
#include <iostream>
using namespace std;
class example
{
public:
example(int i)
{
num=i;
}
void display()
{
cout<<"HelloWorld!I'm number "<<num<<endl;
}
private:
int num;
};
int main()
{
example A(1),B(2);
A.display();
B.display();
return 0;
}



Let me see see 2012-04-15 08:04 发表评论
]]>
Ubuntu初体?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/03/14/167925.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Wed, 14 Mar 2012 14:27:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/03/14/167925.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/167925.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/03/14/167925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/167925.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/167925.html</trackback:ping><description><![CDATA[1.全屏-》窗?双CTRL+F<br />2.调节VirtualBox中Ubuntu虚拟机的分L?br /><span style="widows: 2; text-transform: none; text-indent: 0px; letter-spacing: normal; border-collapse: separate; font: medium 'Times New Roman'; white-space: normal; orphans: 2; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 20px; font-family: Arial, Tahoma, Verdana; color: rgb(85,85,85); font-size: 14px" class="Apple-style-span">不过qUbuntu桌面后,屏幕分L率只能在800×600?40×480之间切换Q刷新频率也是很奇怪的61HZ。Google了下发现是需要和VMWareTool一样需要安装一个虚拟机的辅助工兗先?#8220;讑֤”->“分配光驱”选中VBoxGuestAdditions.isoQ然后运行其中的安装E序或者脚?br /></span></span><br />VirtualBox:~$ sudo sh /media/VBOXADDITIONS_3.2.10_66523/VBoxLinuxAdditions-x86.run<img src ="http://www.shnenglu.com/wc250en007/aggbug/167925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-03-14 22:27 <a href="http://www.shnenglu.com/wc250en007/archive/2012/03/14/167925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.z9559.cn" target="_blank">þ99Ʒþþþ</a>| <a href="http://www.shisanshui.cn" target="_blank">91Ʒ91þۺ</a>| <a href="http://www.gdczjt.cn" target="_blank">þþƷһ</a>| <a href="http://www.bayercas.cn" target="_blank">þǿdŮվ</a>| <a href="http://www.dgltjsh.cn" target="_blank">þɫۺϼ </a>| <a href="http://www.168lala.cn" target="_blank">þùŷպƷ</a>| <a href="http://www.17714.com.cn" target="_blank">þ޹vwww</a>| <a href="http://www.m2fz.cn" target="_blank">þˬ˾ƷƵ</a>| <a href="http://www.biezhuai.cn" target="_blank">˶ݺɫۺϾþ</a>| <a href="http://www.tgbnews.cn" target="_blank">žžƷþþþþ</a>| <a href="http://www.zhongshengwsl.cn" target="_blank">þþþþùƷ볬</a>| <a href="http://www.k6399.cn" target="_blank">þĻ˿</a>| <a href="http://www.ruozhu.com.cn" target="_blank">޾Ʒҹvaþ</a>| <a href="http://www.945ba.cn" target="_blank">þþƷAV</a>| <a href="http://www.eehqv.cn" target="_blank">Ʒŷþþþ޹</a>| <a href="http://www.hf169.cn" target="_blank">ɫۺϾþ </a>| <a href="http://www.plkqry429.cn" target="_blank">Ʒŷ޺ձþ</a>| <a href="http://www.16sg.cn" target="_blank">þۺۺϾþ97ɫ</a>| <a href="http://www.bestlevering.cn" target="_blank">ƷþþþþþĻ</a>| <a href="http://www.nba592.cn" target="_blank">ަvþþ</a>| <a href="http://www.ezhekou.cn" target="_blank">þۺ77777</a>| <a href="http://www.kahb.cn" target="_blank">Ʒþþ㽶</a>| <a href="http://www.fmzz6688.cn" target="_blank">޾Ʒһ߾þ</a>| <a href="http://www.chuchu8.cn" target="_blank">99þùۺ</a>| <a href="http://www.aion66.cn" target="_blank"> þۺϾɫۺϾ99</a>| <a href="http://www.worktrotter.cn" target="_blank">þùҹƷһ</a>| <a href="http://www.yiyaosheji.cn" target="_blank">ھƷþ鶹Ħ</a>| <a href="http://www.odctb.cn" target="_blank">þ99Ʒ</a>| <a href="http://www.jrchen.cn" target="_blank">þùƷӰԺ</a>| <a href="http://www.fm935.cn" target="_blank">91޹˾þþƷ</a>| <a href="http://www.zgpojie.cn" target="_blank">þ뾫Ʒһ</a>| <a href="http://www.hrwp.net.cn" target="_blank">þþþĻɫ </a>| <a href="http://www.jinziwan.com.cn" target="_blank">Ʒþùһ㽶 </a>| <a href="http://www.cnnsmi.org.cn" target="_blank">˾þô߽ӰԺ95</a>| <a href="http://www.dqep.cn" target="_blank">޹Ʒ۲ӰԺþ </a>| <a href="http://www.hbqw.net.cn" target="_blank">þþþùպƷվ</a>| <a href="http://www.sunriseydy.cn" target="_blank">պ޹ۺϾþþ</a>| <a href="http://www.terris.cn" target="_blank">þŷƷ</a>| <a href="http://www.ebuxy.cn" target="_blank">ҹƷþ</a>| <a href="http://www.hvgt.cn" target="_blank">þñ˾þ</a>| <a href="http://www.zgwlptw.cn" target="_blank">Ұ¾þһ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>