This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g++: unrecognized option `-symbolic'


> I need to keep overloaded new and delete operators local to a particular
> shared library (I don't want to export them).  How do I do this?

You can use symbol versioning for that; see the linker documentation
for details.

> I was trying to use the g++ -symbolic option but it returns:
> 
> g++: unrecognized option `-symbolic'
> 
> Is -symbolic broken?  Am I doing something wrong?

It seems -symbolic is not supported on Linux, you may want to try
-Bsymbolic.

> Is this how you would keep other shared libraries from picking up
> overloaded new and deletes from the other library?

No. -symbolic would arrange that your shared library finds its new and
delete implementations in the shared library. Other shared libraries
might still use your version.

Regards,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]