0

ターボ コピー機が DOSBox を使用して Windows 7 にインストールされている場合、コマンド プロンプトを使用してコンパイルおよび実行する方法を教えてください。環境変数 -path 設定を使用してみましたが、プログラムを次のように実行すると

C:\TurboC++\Disk\TurboC3\BIN\tcc Test.c
Turbo c++ Version 3.00 Copyright (c) 1992 Borland 
International:
Error test.c 1:Unable to open include file 'stdio.h'
Error test.c 2:Unable to open include file 'conio.h'
*** 2 errors in Compie ***

      Available memory 4134742

C:\TurboC++\Disk\TurboC3\BIN\

================================== test.c

#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello command prompt");
getch();
}
4

2 に答える 2

0

デフォルトのインクルードファイルを探す場所をコンパイラに伝えていません。通常は -I とディレクトリ パスです。

于 2013-09-26T18:29:44.563 に答える
0

TurboC++, like most other C/C++ compilers from that era, reads its include file locations from either the system environment (an environmental variable named INCLUDE, IIRC) or from a command line parameter you provide.

For info on setting environmental variables, you can do that in the AUTOEXEC.BAT file for your DOSBox configuration, or from a batch file that you set up to run the TurboC++ compiler:

SET INCLUDE=Whatever_Include_Path_You_Need
tcc %1

For specifying it from the command line, type tcc /? from a command prompt. It will display all of the possible command line switches and options.

于 2013-09-26T18:59:55.157 に答える