在Turbo C ++中编译多文件项目 [英] Compiling Multi-File Project in Turbo C++

查看:256
本文介绍了在Turbo C ++中编译多文件项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Visual Studio中的朋友写了一个项目,其中包含 .h .cpp 文件。现在我想在Turbo C ++中编译我的代码,当我编译main函数时发生以下错误:



无法打开包含文件' blah.h'


如何在Turbo C ++中编译我的多文件项目?



我没有在我的生活中在Turbo C ++中写一行!

解决方案

菜单,选择 / strong>菜单,然后选择新建项目。在项目路径和名称中给项目命名的名称将默认为可执行文件的名称。如果要对可执行文件使用不同的名称,请在目标字段中输入该名称。默认情况下,具有相同名称的 .cpp 文件将添加到源文件列表中。在最后一部分的示例中,如果项目名为trial,则可执行文件将为 trial.exe ,源代码文件trial.cpp将自动包括在要编译的文件列表中。在按OK按钮之前,您应该选择'Easywin'目标选项,并且还要按'Application Expert'按钮,并清除对.def和 .rc 文件。项目设置完成后,您可以使用添加节点按钮(具有图标,但没有文本)将其他源文件添加到需要编译的源文件列表中,或者通过拖动源文件鼠标从普通的Windows文件管理器,并释放鼠标按钮的目标(在这种情况下 trial.exe )在项目中的表示。



有关详情,请查看以下链接: http:/ /dybfin.wustl.edu/willard/turbohlp.html


I have written a project for a friend in Visual Studio, containing bunch of .h and .cpp files. Now I want to compile my code in Turbo C++ and when I compile the main function the following error occurs:

unable to open include file 'blah.h'

How can I compile my multi-file project in Turbo C++?

I haven't written a line in Turbo C++ in my life! So any help would be appreciated.

解决方案

From the menubar, select the Project menu, then New Project. The name you give the project in 'Project Path and Name' will by default be the name that the executable file will have. If you want a different name for the executable file, enter that name in the 'Target' field. By default the .cpp file with the same name will be added to the list of source files. In the example in the last section, if the project is given the name trial, then the executable file will be trial.exe and the source code file trial.cpp will automatically be included in the list of files to be compiled. Before pressing the OK button, you should select the 'Easywin' target option, and also press the 'Application Expert' button, and clear the check marks against the .def and .rc files. Once the project is set up, you can add other source files to the list of those that need to be compiled by either using the 'Add node' button (which has an icon, but no text), or by dragging the source file with the mouse from the ordinary Windows File Manager and releasing the mouse button over the representation of the target (in this case trial.exe) in the project.

For more information take a look at the following link: http://dybfin.wustl.edu/willard/turbohlp.html

这篇关于在Turbo C ++中编译多文件项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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