开发者

Running a pre-build event on every file in a MSVC 2010 project

I'm trying to get Visual Studio 2010 to execute a FOR lo开发者_开发技巧op - 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 !


Anyway you have to write msbuild script target for this and run as BeforeBuild target of project.

When you build a project that contains several files, you can list each file separately in the project file, or you can use wildcards to include all the files in one directory or a nested set of directories.

See more here How to: Select the Files to Build

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜