如何使用Visual C ++ 6.0在预生成事件中自动生成.cpp和.h文件 [英] How to auto-generate .cpp and .h file in a pre-build event using Visual C++ 6.0

查看:203
本文介绍了如何使用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.


这篇关于如何使用Visual C ++ 6.0在预生成事件中自动生成.cpp和.h文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆