AnsweredAssumed Answered

How to add libraries programmatically to CCES

Question asked by YousraA on Jun 20, 2013
Latest reply on Jun 21, 2013 by amcl

Hi,

I'm developing a plugin to be used with CCES and one of the things I want to be able to do with this plugin is to add a library to my project. I found this code snippet and tried to modify it to be used with CCES but I got stuck!  The first 2 lines is where I'm stuck. I'm not sure what to use instead of these string values for CCES. Please let me what I can use.

 

                                         IProjectType ProjectType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.gnu.cross.exe"); // ??
                                        IConfiguration config = ProjectType.getConfiguration("cdt.managedbuild.config.gnu.cross.exe.debug");  // ?? 
  
                                        for (ITool t : config.getToolChain().getTools()) 
                                        {
                                     if (t.getId().contains("linker")) 
                                     {
                                         IOption o = t.getOptionBySuperClassId("linker.option.libdoj");
                                                                           // setup paths ArrayList
                                                             try
                                                            {
                                                                      config.setOption(t, o, "C:\\Research\\NewUnitTestLibs_BF533.dlb");
  
                                                            } catch (BuildException e)
                                                            {
                                                                      // TODO Auto-generated catch block
                                                                      e.printStackTrace();
                                                            }
                                                  }
                                        }

 

Thanks,

Yousra

Outcomes