c++ - Partially external linkage -
c++ - Partially external linkage -
i have next problem deal with:
there external component compiled .lib file static linkage the external component requires specific function/operator interface available (i.e., function must nowadays in compilation unit) i not want function accessible code isn't in external component i not have command of specific function interface (or access portion of external component source code), it's given function in global scopeis there way accomplish this? if matters, compiler vc++ 2012
.
edit:
the output binary shall single, dlls , similar won't do. is possible limit symbol visibility among .obj files in single .lib not other .libs? if it's possible, i'd compile function .lib , repackage external .lib.
this can't achieved directly. static libs definition not undergo linkage rather supply building blocks executable binaries, there no sense in wanting expose symbol consumed static lib. static libs not 'consume' symbols - binaries (that undergo linkage) do.
but may able vastly cut down chances of using custom library callback, if build obj file , re-package along static lib. lib can that. no 1 else have access source - or header - of custom callback, implementation still exported lib if hacked it's exact symbol name (which assme you're trying defend from).
c++ visual-c++ visual-studio-2012
Comments
Post a Comment