Community
Participate
Working Groups
In a project we have multiple static libraries (build using cdt), two of which have circular dependencies to each other, that link together into an executable (also built using cdt). With the "GCC C Linker" selected it's impossible to build that file. The linker complains about missing references when the static libraries are simply added in the "C/(C++ Build -> Settings -> GCC C Linker -> Libraries" tab, because references of the library that appears last on the generated command line has undefined references. The solution would be to add "--start-group -lX -lY --end-group" to the linker command line *after the list of the object files*. But that's simply not possible. The additional linker options (both the "Linker flags" and "Other options (-Xlinker [option])" fields) that can be specified on the "GCC C Linker -> Miscellaneous" tab are added to the command line before the object, which has essentially no effect. N.B. In our project I have installed a (dirty) workaround: I have added the linker options (-Wl,--start-group,-lX,-lY,--end-group) to the "Other objects" field (and added a dummy make rule in makefile.init so make won't complain about it) to force CDT to put it after the list of objects. It works but is really ugly.
Hello, I am wondering if this issue was addressed.
Resolved via: https://github.com/eclipse-cdt/cdt/issues/608