Limiting the scope of global symbols from linked objects
问题 I have a C library in an archive file, clib.a . I've written a C++ wrapper for it, cpp.o , and would like to use this as a static library: ar cTrvs cppwrap.a clib.a cpp.o Code which links to this won't be able to use the stuff from clib.a directly unless the correct header is included. However, if someone coincidentally creates an appropriate prototype -- e.g. void myCoincidentallyNamedGlobalFunction() -- I'm concerned which definition of myCoincidentallyNamedGlobalFunction will apply. Since