Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Adding C/C++ libraries for custom C/C++ projects in CDT.(Adding C/C++ libraries for custom C/C++ projects in CDT.)
Adding C/C++ libraries for custom C/C++ projects in CDT. [message #893637] Thu, 05 July 2012 04:02 Go to next message
vishwaroop srivastava is currently offline vishwaroop srivastavaFriend
Messages: 6
Registered: January 2012
Location: India
Junior Member
Hello everyone,

I have created a plug-in based on MBS design for C/C++ project.

I am facing problem in adding custom libraries while creating the project in code.

to include libraries from the code, I am using "setRawPathEntries" in overridden methode createIProject to add it for C Project. it is working fine. but it is not working when i use Eclipse Juno with CDT 8.1. I want to include external libraries ( which are not local C/C++ libraries like cygwin gcc installed in the machine) for my project same like it comes for CDT's default C/C++ project after creating the project if gcc is installed in the system.

Is there any other way to add the include libraries from the code ? I didn't find other methods to include the libraries for C/C++ project.
Re: Adding C/C++ libraries for custom C/C++ projects in CDT. [message #894234 is a reply to message #893637] Sun, 08 July 2012 01:27 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
Could you open a bug in bugzilla and provide some more detailed information? I'd like to understand what you are doing and whether there is a regression in Juno release.
A sample plugin demonstrating the issue would be nice.

Thanks,
Andrew
Re: Adding C/C++ libraries for custom C/C++ projects in CDT. [message #896614 is a reply to message #894234] Thu, 19 July 2012 07:24 Go to previous message
vishwaroop srivastava is currently offline vishwaroop srivastavaFriend
Messages: 6
Registered: January 2012
Location: India
Junior Member


For my custom tool chain, I have implemented same tool option as gcc compiler contains in Tool Setting page under C/C++ project property page. like Warning, Devug level, Includes, General etc.

so for my tool chain if i add any library from Include option of my custom compiler and click on Apply and OK. i can see the the newly added include link in project explorer for the project in "Includes". It worked in helios in indigo. but it is not working in Juno.

i am facing this problem only with my tool chain. default CDT's tool chain for gcc , g++ compiler doesn't have any problem.

Here is the some part of the code which i have used to add an external library location as include library. the same was working fine with eclipse helios and indigo. but it is not working with Juno. code mentioned below is just for reference just to understand what i am doing to add the libraries for custom C/C++ project.




1. Extending CDT's wizard class with custom wizard- CustomProjectWizard extends CDTCommonProjectWizard.

2. overriding createIProject, creating a project as -


newProject = CCorePlugin.getDefault().createCDTProject(description,
newProjectHandle, new SubProgressMonitor(monitor, 25));


private ICProject cProject;


cProject = CoreModel.getDefault().create(newProject);


private List<IIncludeEntry> newEntries;


newEntries.add(CoreModel.newIncludeEntry(newProject.getFullPath(), null,
new Path(strLink), true));


cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]),
null);


Thanks,
Vishu.


Previous Topic:Mac Hello World Project - No Rule To Make Target 'all' Error
Next Topic:Eclipse CDT - display freeze on ubuntu
Goto Forum:
  


Current Time: Fri Mar 29 11:46:56 GMT 2024

Powered by FUDForum. Page generated in 0.04792 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top