https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64202
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>g++ -O0 -g -c test_lib.cpp -o test_lib.o
You need to compile this with -fPIC.
