开发者

Library order in Eclipse CDT

I am having an issue with Eclipse (Indigo) regarding the order in which my static libraries are being included. I am using the managed builder in CDT with gcc as the compiler. My workspace has many static library projects and a couple executable projects that reference said libraries. I am using Microsoft's Team Explorer Everewhere as my source control.

gcc is rather particular about the order in which libraries are included, so I have made sure to put them in the correct order for my executable projects (by going to Project-->Properties-->C/C++ Build-->Settings-->GCC C++ Linker-->Libraries). However, if I modify a project setting on a referenced static library (it doesn't matter which setting) the library order in all consuming executable projects gets reordered! This black magic stuff wouldn't necessarily bother me if it just worked after doing this,开发者_高级运维 but CDT reorders the libraries completely wrong.

I suspect this is related to my executable projects "referencing" the libraries, but this is something needed so that when I change a library the executable project detects the change and re-links as needed. I have turned off discovery options, indexing, and a few other options to see if those made any changes. I've also googled for a solution but without avail. I am about to just turn off the managed features and go to makefiles, but that is a last resort for me :)


From my understanding, all the ordering of libraries in the current workspace are derived from the order of referencing projects. To change this, go to the projects property page, c/c++ general, paths and symbols and use the references tab. Changing this will change the order which cdt will use when it generates the order for the libraries to link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜