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?

Cheeers,
Jim

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()))) {
               description.setLocation(projectLocation);
} //
           // This code C project and make natures ...
           //
           project.create(null);
           project.open(null);
           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 ...
           //
           CreateMyMakefile(project);
           CreateHelloWorldFile(project);
IFolder src = CreateFolder(project, "src"); CreateFolder(src, "cfgs");
           CreateFolder(src, "cmps");
           CreateFolder(src, "fwk");
           CreateFolder(src, "ifs");

James Don wrote:
Hello,

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,
Jim
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top