Linking using g++ fails searching for -lstdc++

前端 未结 3 1355
孤街浪徒
孤街浪徒 2020-12-13 10:00

I\'m trying to use someone else\'s Makefile to complile a very simple c++ library. The makefile is as follows:

JNIFLAGS=-O2 -pthread -I/usr/lib/jvm/java-6-su         


        
3条回答
  •  遥遥无期
    2020-12-13 10:22

    It seems you're compiling a 32 bit library on a 64 bit machine, however a 32 bit version of libstdc++ is not present.

    Try apt-get install ia32-libs libc6-i386 libc6-dev-i386 lib32gcc1 lib32stdc++6

    (btw. you're producing a .so , you should specify -fPIC when compiling your .cpp files as well)

提交回复
热议问题