libstdc++ GLIBCXX version errors

前端 未结 4 1274
野性不改
野性不改 2020-12-05 21:23

when I compile a c++ program in my computer using g++ and transfer the executable to run it on my university server, I get

./main: /usr/lib/libstdc++.so.6:          


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 22:05

    What platforms are you trying to compile for? i.e. 'Your computer' and your 'University servers' ?

    You could try compiling your program with the static linking option. This will generate a statically linked executable with all lib dependencies loaded already.

    Cheers,

提交回复
热议问题