正在加载...
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]

gcc 动态编译

[ 2011/10/03 17:24 | by selboo ]
gcc 动态编译(共享库)
  动态编译的可执行文件需要附带一个的动态链接库,在执行时,需要调用其对应动态链接库中的命令。
  
优点:体积小,编译快
缺点:依赖性高
This is The C Code
[root@74-82-173-217 shared]# cat add.c
int add (int x, int y) {
        return x + y;
}
Parsed in 0.007 seconds at 13.01 KB/s
add.c 求和函数
This is The C Code
[root@74-82-173-217 shared]# cat print.c
#include <stdio.h>
void print (int x) {
       printf ("%d\n",x);
}
Parsed in 0.009 seconds at 11.67 KB/s
print 打印函数
Tags: , ,

gcc 静态编译

[ 2011/10/01 19:32 | by selboo ]
gcc 静态编译
        就是在编译的时候把你所有的模块和库文件编译到一个可执行文件中,当你启动这个程序的时候所有模块和库加载到内存。加快程序执行效率,
优点:速度快,依赖性低
缺点:体积大,加载慢
This is The C Code
[root@74-82-173-217 static]# cat add.c
int add (int x, int y) {
        return x + y;
}
Parsed in 0.007 seconds at 11.65 KB/s
add.c 求和函数
This is The C Code
[root@74-82-173-217 static]# cat print.c
#include <stdio.h>
void print (int x) {
       printf ("%d\n",x);
}
Parsed in 0.008 seconds at 13.38 KB/s
print 打印函数
Tags: , ,


config.status: executing depfiles commands
config.status: executing libtool commands
/bin/rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands

Thank you for choosing MySQL!

Remember to check the platform specific part of the reference manual
for hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory.



解决:
[root@74-8
Tags: , , ,

查看ANMP编译参数

[ 2009/05/19 16:43 | by selboo ]
通常我们编译完 Apache,Nginx,Mysql,Php。想查看编译参数可以用下面方法

查看Apache编译参数:
cat /usr/local/apache2/build/config.nice

查看Nginx编译参数:
/usr/local/nginx/sbin/nginx -V

查看Mysql编译参数:
cat "/usr/local/mysql/bin/mysqlbug"|grep configure

查看Php编译参数:
/usr/local/php/bin/php -i |grep configure
Tags:
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]