01-23-04 09:51 PM
Sebastian Wagner wrote:quote:
> Hi!
>
> In our company we have a big c++ software project devided into several
> shared object libs. several programs link particular so's to
> executables.
>
> my question is: assuming that the .h files don't change but only the
> .cpp files and maybe some compilerflags: is it necessarry to re_link_
> the executables after building a new .so file?
>
Linking to a .so just resolves references to symbols that are used by
the program (or other libraries). So if your new .so build doesn't
change or remove any of the symbols that the program (or other .sos)
resolved when it was linked then the program will execute without
relinking.
For example, you could build a skeleton version of an API what does
nothing (i.e. stubs) but can be built to a .so. Then you could link
programs against that .so containing stubs. When you replace the stub
version with a fully implemented version the programs will run, no
linking necessary.
Of course, if you change the interface to the .so from what it was when
the program was *compiled* then it will still run but unpredictable
results can be predicted.
-- ced
--
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.
[ Post a follow-up to this message ]
|