Re: Ubuntu 10.04下cce-0.51原代码编译安装
发表于 : 2010-06-11 2:35
内牛满面啊……在老笔记本上装了个slitaz,用起来很不错,就是没有能在控制台下查看、输入中文,尝试过自己编译,不过没有成功。通过google搜到了这里,一次性编译通过了,太赞了…… 

真是高兴,又有人编译安装成功!而且是在slitaz上编译的,我没有测试slitaz,只试了ubuntu. 多谢jiazhoulvke的回复,让我感动。jiazhoulvke 写了:内牛满面啊……在老笔记本上装了个slitaz,用起来很不错,就是没有能在控制台下查看、输入中文,尝试过自己编译,不过没有成功。通过google搜到了这里,一次性编译通过了,太赞了……
第二个针对性的网页:How to compile a 32-bit application using gcc on the 64-bit Linux version
by VIVEK GITE · 17 COMMENTS
I had to compile a 32-bit application using GNU gcc on the 64-bit version Linux.
Luckily gcc man page directed me to -m32 and -m64 option. These options generate code for a 32-bit or 64-bit environments.
=> The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system.
=> The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture.
You can pass -m64 or -m32 as follows
For 32 bit version:
$ gcc -m32 -o output32 hello.c
For 64 bit version :
$ gcc -m64 -o output64 hello.c
And output is :
$ ./output32
Output:
Long int size is 4 bytes long!
Now let us see 64 bit output:
$ ./output64
Long int size is 8 bytes long!
Sample code - hello.c:
#include <stdio.h>
int main(){
long z; printf("Long int size is %i bytes long!\n", sizeof(z)); return 0;
}
代码: 全选
./configure CC="gcc -m32"
sudo make
sudo make install