This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Linking order question


A library *BAR* is composed of the object file *bar**.o* that contains the symbol *foo* and *qux*.
A *FOO* library depends on symbol *foo*.
A *QUX* library depends on symbol *qux***.

Can I assert the following linking orders outcomes?

    -lFOO -lQUX -lBAR     : OK and logically right

-lFOO -lBAR -lQUX : OK <-- this still works because FOO brought in bar.o so QUX still finds the qux symbol.

-lBAR -lQUX : FAIL bar.o is excluded because it was not found to be useful to anyone preceeding -lBAR.

Is this correct?

Thanks and regards,
RM


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