Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CDT 4.x.x createCDTProject for cygwin

Hello Just a quick followup ... and new question ...

I managed to create a new project and associate a make file with it ...

I now have a new objective ... how do i tell the makefile to use cygwin and not mingw?


ps here's the code i use to create project and makefile ...

           // Create a new CDT project
           String projectID=
"org.eclipse.cdt.managedbuilder.core.configurationDataProvider"; IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(page1.GetProjectName());
           IPath projectLocation = project.getRawLocation();
if (project.exists()) { project.delete(true, true, null); }
           IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProjectDescription description = workspace.newProjectDescription(project.getName());

if ((projectLocation != null) && (!projectLocation.equals(Platform.getLocation()))) {
} //
           // This code C project and make natures ...
           CProjectNature.addCNature(project, null);
MakeProjectNature.addNature(project, null); ScannerConfigNature.addScannerConfigNature(project); ScannerConfigNature.initializeDiscoveryOptions(project); CCorePlugin.getDefault().mapCProjectOwner(project, projectID, true);

// This code creates a makefile, helloworld.c file, and some folders ...
IFolder src = CreateFolder(project, "src"); CreateFolder(src, "cfgs");
           CreateFolder(src, "cmps");
           CreateFolder(src, "fwk");
           CreateFolder(src, "ifs");

James Don wrote:

I have managed to plugin depenening on cdt ... from this plugin i can create a CDT project (by calling createCDTProject) ... I can add new folders, and c files to the project.

I was wondering if someone could give me a little guidance/help on my next steps which are:

- create a makefile
- associate it with the project and have the project build using it

I am reading the CDT source code for the 4.0 branch in the meantime ...

Thanks again,
cdt-dev mailing list

Back to the top