On 6 June 2011 22:02, kevin diggs wrote: > > I *think* you want something like: > > g++ -c -fPIC <blahx.cpp> <blahy.cpp> ... > g++ -shared -oloibSM_Backend.so blahx.o blahy.o ... You should use -fPIC on the second command too, the docs for -shared say: For predictable results, you must also specify the same set of options that were used to generate code (-fpic, -fPIC, or model suboptions) when you specify this option.