https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98105
Bug ID: 98105 Summary: constexpr and unnamed namespace yields relocation R_X86_64_PC32 against undefined symbol ... can not be used when making a shared object; recompile with -fPIC Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: peter_foelsche at mentor dot com Target Milestone: --- Created attachment 49665 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49665&action=edit g++-10 -std=c++11 2.cxx -shared -fPIC please compile with g++-10 -std=c++11 2.cxx -shared -fPIC This is g++: g++-10 (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.