Eclipse CDT .cproject file from Windows to Unix

后端 未结 1 778
轮回少年
轮回少年 2021-01-15 00:30

I have a legacy, in-house tool that creates an Eclipse CDT project out of all the C files that I use to run Simulink simulations. I use the eclipse project as front end to G

相关标签:
1条回答
  • 2021-01-15 01:01

    .cproject files aren't really designed to be generated by external tools. Their exact format is not documented, and is considered to be an implementation detail.

    Extensibility and automation in the Eclipse ecosystem is intended to happen through Eclipse plugins. Eclipse plugins have access to a set of stable, documented APIs which can be used to manipulate an Eclipse workspace. For example, for creating a project you might use APIs like IWorkspaceRoot.getProject(), IProject.create(), and CoreModel.create(IProject). The implementation of these APIs will take care of details such as creating the .cproject file.

    If you really want to generate the .cproject file yourself, your best bet is to refer to the CDT source code for details about its exact format, and ask any clarifying questions on the CDT mailing list. It may also be helpful to look at the source code of other cross-platform tools that create .cproject files, such as CMake which has an Eclipse project generator.

    0 讨论(0)
提交回复
热议问题