linker - Windows Static Library with Default Functions -
i create static library (.lib) in windows can used in subsequent builds "backup" undefined functions.
for instance let's have foobar.lib has definitions for:
foo bar and have other program defines foo , built dll must export foo , bar. want able use foobar.lib automatically export default definition of bar in resulting dll (and ignore definition of foo in foobar.lib).
i have tried sending foobar.lib linker multiple defined symbols error (/force supposed override strong warnings won't work expected). i've tried using /nodefaultlib:foobar.lib ignores library , says bar undefined.
i 100% there way because use application (abaqus) allow users write plug-ins , not have define of required exports plug-in dll. , not use /force option.
i figured out solution (not sure if or best solution).
i trying define foo , bar in foobar.lib using 1 object file (foobar.obj). if split foo.obj , bar.obj , use create foobar.lib linker can ignore appropriate .obj files.
so short answer is: 1 function per object file static library.
Comments
Post a Comment