简体   繁体   中英

Integrate code generation with eclipse c++ build

I am using Eclipse for C++ development on windows. I have also written a code generator that take an xml file and produces several C++ files. The project I am working on is currently setup to use the internal builder. What I would like to do is to run the code generator as part of the build process.

My problem is that I haven't been able to find a way to make Eclipse identify that the files are present (or have been updated) without 'Refeshing' the project. So although I can run the code generator as a pre-build step, the files generated aren't guaranteed to be included in the build.

Does anybody know whether there is a way to make Eclipse do a refresh after the pre-build step or something to that effect, using the internal builder?

Thanks

您可以将Builder添加到项目中。

I'm not sure if this is possible using the internal builder of Eclipse. Refreshing has always been a problem there. But using external build tool, like Maven or Ant, works! I personally would switch to Visual Studio - there you never have such kind of problems

虽然我没有尝试使用CDT项目启用Preferences-> General-> Workspace - > Refresh自动帮助我处理涉及代码生成的Web和Java项目。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM