SUSE 64位编译32位程序出错
2017-04-02 08:56
507 查看
These `-m’ switches are supported in addition to the above on AMD x86-64 processors in 64-bit environments.
-m32
-m64
-mx32
Generate code for a 32-bit or 64-bit environment.
The -m32 option sets int, long and pointer to 32 bits and generates code that runs on any i386 system.
The -m64 option sets int to 32bits and long and pointer to 64 bits and generates code for AMD’s x86-64 architecture.
The -mx32 option sets int, long and pointer to 32 bits and generates code for AMD’s x86-64 architecture.
For darwin only the -m64 option turns off the -fno-pic and -mdynamic-no-pic options.
因此在32位 linux make编译文件的时候 gcc -g -c 无需带-m32
在x86_64位linux make编译文件的时候 cc -m64 -g -c 是-m64必须带的。
可参考
http://blog.csdn.net/yyywill/article/details/54426900
-m32
-m64
-mx32
Generate code for a 32-bit or 64-bit environment.
The -m32 option sets int, long and pointer to 32 bits and generates code that runs on any i386 system.
The -m64 option sets int to 32bits and long and pointer to 64 bits and generates code for AMD’s x86-64 architecture.
The -mx32 option sets int, long and pointer to 32 bits and generates code for AMD’s x86-64 architecture.
For darwin only the -m64 option turns off the -fno-pic and -mdynamic-no-pic options.
因此在32位 linux make编译文件的时候 gcc -g -c 无需带-m32
在x86_64位linux make编译文件的时候 cc -m64 -g -c 是-m64必须带的。
可参考
http://blog.csdn.net/yyywill/article/details/54426900
相关文章推荐
- 32位系统上开发的Access为数据库的程序在64位机器上运行出错的解决办法
- 64位程序编译:终于将City****由32位编译为64位了
- GCC 64位程序的makefile条件编译心得——32位版与64位版、debug版与release版(兼容MinGW、TDM-GCC)
- windows 32位程序编译成64位
- 在64位机器上编译32位程序
- g++选择编译32位程序和64位程序
- 在64位服务器上安装oracle 32位客户端只能被编译为x86的程序连接
- 64位Linux下编译32位程序
- win7 64位平台编译的程序在XP 32位平台无法运行的解决方法
- gcc 64位主机编译出32位程序和库
- 64位Linux 编译32位程序
- 在32位系统下编译64位程序
- 【Delphi】32位源码编译64位程序时的字节对齐问题
- GCC 64位程序的makefile条件编译心得——32位版与64位版、debug版与release版(兼容MinGW、TDM-GCC)
- 在64位linux下编译出32位程序
- 使用VC6将32位程序编译成为64位程序
- 在64位的CentOS上编译32位的程序
- 在32位系统下编译64位程序
- Debian x64 编译 32位程序出错的一些解决方法
- 在64位linux上编译32位程序