Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using 32bit .so file in a 64bit environment

I am using Ubuntu 12.04 64bit and I am getting the following error while compiling a Qt project which needs a 32bit .so file.

error: skipping incompatible /opt/lib/libEposCmd.so when searching for -lEposCmd

I want to compile this project with -m32 option but I don't know where should I insert this option.

like image 211
Farshid616 Avatar asked Nov 02 '22 04:11

Farshid616


1 Answers

Problem Solved through below instruction:

  • installing g++-multilib, libstdc++.i386, libgcc.i386, glibc-devel.i386, gcc-c++-32bit
  • edite make file and adjust below config:

    cc = add -m32
    CFLAGS = add -m32
    INCPATH = linux-g++-32
    LFLAGS = -m32 -w1, -o1
    LIBS = i386-linux-gnu
    
  • make softlink of

    /usr/lib/i386-GNU-linux/libQtCore.so.4.1
                        libQtGui.....
                        libQtXmlPattern..
                        libQtXml.....
    

    to lib .... .so.o then to lib .... .so make clean and compile

like image 112
Farshid616 Avatar answered Nov 15 '22 05:11

Farshid616