32位环境库 linux
2012-11-22 15:55:02 ljy520zhiyong 阅读数 899

1.汇编:

   as -32 -o hello.o hello.s 

2.链接:

  ld -dynamic-link  /lib/ld-linux.so.2 -lc -melf_i386 hello.o -o hello


2016-09-03 08:34:10 hehuibo 阅读数 2853

Ubuntu 12.04 and later
sudo apt-get update sudo apt-get install libgtk2.0-0:i386 libxtst6:i386 gtk2-engines-murrine:i386 lib32stdc++6 libxt6:i386 libdbus-glib-1-2:i386 libasound2:i386

RHEL 5 and later:
yum install glibc-devel.i686 gtk2-devel.i686 libcanberra.i686 libcanberra-gtk2.i686 PackageKit-gtk-module.i686 GConf2.i686 ncurses-libs.i686 xulrunner.i686

Fedora 14:
yum install glibc-devel.i686 gtk2-devel.i686 gtk-nodoka-engine.i686 libcanberra.i686 libcanberra-gtk2.i686 PackageKit-gtk-module.i686 GConf2.i686 ncurses-libs.i686 xulrunner.i686

2014-08-18 13:15:47 czl_chen 阅读数 2551

在64位Ubuntu下编译32位程序容易出现很多问题,主要是编译库不对;

尝试安装下列库可能解决问题:

$sudo apt-get install 
libc-6-dev-i386 
libc6-i386 
lib32gcc1 
gcc-multilib 
gcc-4.6-multilib 
g++-multilib 
g++-4.6-multilib 
lib32stdc++ 
lib32quadmath0 
lib32gomp1 
这是32位编译库,安装完毕后很大可能解决不能编译的问题,但是有一些情况也无法编译,我未能解决。

希望有更多解决方案交流...

2017-06-16 09:42:11 YINHAOXU1 阅读数 4999

记录:

-------------------------------------------------------------------

centos7.x 安装了glibc:glibc-2.17-157.el7.i686

glibc-2.17 nodeps安装,即可运行cfgm2

-------------------------------------------------------------------

centos 6.x  :you may need to installmissing 32-bits package before key generation: mount  the cdrom to under /media/ and execute following: --disablerepo=\* --enablerepo=c6-mediainstall ld-linux.so.2)

或者安装:glibc-2.12-1.132.el6.i686

-------------------------------------------------------------------

ubuntu 16.04:

缺少环境报出这个错误:-bash: /xxxxx/xxxxxxxxxxxx/xxxxx: No such file or directory

安装了libc6: libc6_2.23-0ubuntu3_i386.deb 

地址:https://ubuntu.pkgs.org/16.04/ubuntu-main-i386/libc6_2.23-0ubuntu3_i386.deb.html

-------------------------------------------------------------------

-------------------------------------------------------------------

推荐几个很好的下载安装包的地址:

https://altlinux.pkgs.org/

http://download.chinaunix.net/

http://ftp.isu.edu.tw/


2011-01-12 12:29:00 kaifengchen 阅读数 1478

 

在Linux 64服务器应用开发中,要调用一个第三方的32位静态库,会产生undefined reference to的错误,由于没有源代码,为了兼容可使用 -m32 方式进行编译。不过这种方式会使得整个程序按32位进行编译,以下摘自 man gcc

 

       -m32
       -m64
           Generate code for a 32-bit or 64-bit environment.  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.

 

可以将要调用32位库的功能部分写成独立的部分,再由主程序集成调用(比如先fork,再execl)。

 

没有更多推荐了,返回首页