ELF: linking: Why do I get undefined references in .so files

前端 未结 4 2023
刺人心
刺人心 2021-02-06 03:50

I\'m trying to build a program against wxWidgets, and I get a linker error. I\'d like to really understand what it means. The error is:

/usr/lib/libwx_baseu-2.8.         


        
4条回答
  •  独厮守ぢ
    2021-02-06 04:16

    I think you don't link to some of the libraries when linking your program.

    You should link in your program to all shared libraries you link to in your .so

    If the .so is linked to some static libraries - it's not required in the program to link to them if all needed symbols are found in the .so

    You may use nm linux command to see the symbols in object file, library or binary

    Edit
    Your particular problem can be described here: http://old.nabble.com/-Bug-49433--gcc4.4,-NEW:-gcc4.4-misses-std::endl-implementation-at--O2%2B-td22836171.html

提交回复
热议问题