如何使用Visual C ++ 6.0在预生成事件中自动生成.cpp和.h文件
问题描述:
我想在Visual C ++ 6.0中使用预构建事件来运行脚本,该脚本将自动生成.cpp和.h文件,但是我不确定这些文件如何添加到项目中...所以当我建立专案时
1)脚本必须生成.cpp和.h文件
2)需要将这些文件添加到项目中
3)必须全部重建.
我能指出一个正确的方向来实现这一目标吗?任何示例应用程序也赞赏.提前非常感谢您.
SKS
I''m want to use a pre-build event in Visual C++ 6.0 to run a script which will automatically generate a .cpp and .h files, but I am not sure how these files could add to project ... So when I build the project
1) script has to generate .cpp and .h files
2) Needs to add these files to project
3) Has to do a rebuild all.
can any point me in a right direction to achieve this ? any sample application also appreciated. Thank you very much in advance.
SKS
答
如果生成的文件始终相同(文件数和名称相同),则可以手动运行脚本,然后将生成的文件添加到您的项目;之后,每次重建项目时,文件都会重新生成,然后进行编译.
If the generated files are always the same (same number of files and same names), you can run your script manually, then add the generated files to your project; after that, each time you rebuild the project, the files will be re-generated, then compiled.