0

I'm trying to get Visual Studio 2010 to execute a FOR loop - just like the ones that can be done in a .bat file - as a pre-build event command... No luck this far.

Long story short, I'm trying to get Qt's moc.exe to iterate on all my header files at build time. If this work, another thing to achieve would be to include the generated moc_*.cpp files in the build process, but I'm not quite there right now.

Any idea ? Thanks a lot !

4

1 回答 1

0

无论如何,您必须为此编写 msbuild 脚本目标并作为BeforeBuild项目目标运行。

构建包含多个文件的项目时,可以在项目文件中单独列出每个文件,也可以使用通配符将所有文件包含在一个目录或一组嵌套目录中。

在此处查看更多信息如何:选择要构建的文件

于 2011-07-29T09:43:15.310 回答