I am trying to create a shared library using g++ 5.4.0 on Ubuntu Linux.
I have built static libs (.a files) of the Poco C++ library and I want to statically link those into my shared library.
But it is not working.
I have added the following string to my build script:
-Wl,-whole-archive -lPocoFoundation -Wl,-no-whole-archive
g++ complains with the following error message:
relocation R_X86_64_32S against '-ZTVN4Poco15ArchiveStrategyE' can not be used when making a shared object; recompile with -fPIC
Can someone help?