Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Custom toolchain - how to specify a library and include file?

On 05/27/2011 03:33 PM, Eugene Ostroukhov wrote:
I apologize for writing to this mailing list - Eclipse forums don't log
me in for whatever reason.

I am defining a new CDT toolchain. It is using GNU linker hence I base
our linker tools on decendants of cdt.managedbuild.tool.gnu.cpp.linker

How can I add a library to link against? I found that I can subclass an
option for linker but this has a drawback that the user will see the
library in his UI and potentially remove it breaking his project
configuration.

Well, one sneaky way to do it would be to make the type an enumerated list of one possible choice, with that choice also being the default. That way they couldn't remove it or change it.

On a separate note, is there some way to specify a header file that will
be included in all C/C++ files in the project even without the #include
directive? Think of stdio.h in K/R C

gcc/g++ have a "-include <file.h>" option on the command line. Does your toolchain's compiler have a similar feature?

- Corey


Back to the top