gcc 动态编译(共享库)
动态编译的可执行文件需要附带一个的动态链接库,在执行时,需要调用其对应动态链接库中的命令。
优点:体积小,编译快
缺点:依赖性高
int add (int x, int y) {
return x + y;
}add.c 求和函数
#include <stdio.h>
void print (int x) {
printf ("%d\n",x);
}print 打印函数
动态编译的可执行文件需要附带一个的动态链接库,在执行时,需要调用其对应动态链接库中的命令。
优点:体积小,编译快
缺点:依赖性高
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 12.25 KB/s
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.005 seconds at 22.22 KB/s
gcc 静态编译
就是在编译的时候把你所有的模块和库文件编译到一个可执行文件中,当你启动这个程序的时候所有模块和库加载到内存。加快程序执行效率,
优点:速度快,依赖性低
缺点:体积大,加载慢
int add (int x, int y) {
return x + y;
}add.c 求和函数
#include <stdio.h>
void print (int x) {
printf ("%d\n",x);
}print 打印函数
就是在编译的时候把你所有的模块和库文件编译到一个可执行文件中,当你启动这个程序的时候所有模块和库加载到内存。加快程序执行效率,
优点:速度快,依赖性低
缺点:体积大,加载慢
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.004 seconds at 22.07 KB/s
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.005 seconds at 19.60 KB/s
/bin/rm: cannot remove `libtoolT': No such file or directory
[ 2011/01/09 12:40 | by selboo ]
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
查看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
查看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