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

前端 未结 3 1353
孤街浪徒
孤街浪徒 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:34

    Answering my own question:

    Ths solution seems to be a bit of a hack, you need to create a symlink for the 32 bit version of the library (after installing the packages mentioned in @nos's answer):

    $ sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
    

    Once you've done this, the linker will automagically find the correct library to use.

提交回复
热议问题