China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-09-15 03:11
中国DOS联盟论坛 » DOS软件下载 & 游戏分享 (下载室) » How to run the main program of DJGPP C/C++ 2.03? View 2,072 Replies 13
Original Poster Posted 2003-03-09 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
Hello everyone!
I downloaded DJGPP C/C++ 2.03. I heard it can be used without installation. But no matter what I do, I just can't find its main program. What is it called, and how do I run it under DOS?
I hope all the experts here can give me some advice, thanks!
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Floor 2 Posted 2003-03-09 00:00 ·  中国 浙江 宁波 联通
银牌会员
★★★
Credits 1,001
Posts 309
Joined 2002-11-19 00:00
23-year member
UID 283
Gender Male
Status Offline
Set up the environment variables
set include=path (the path to the include folder)
set lib=path (the path to the lib folder)
Set the path for the main directory's (bin)
Compile command gcc (C)
gcc test.c or gcc -o test.exe test.c
gcc has a lot of parameters, take a look yourself
Floor 3 Posted 2003-03-09 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
Sorry, my English is very poor!
In which file do you set what you called "set up the environment variables"? Could you explain it in a bit more detail? Also, I still don't know which one is its main program. Can you tell me? It's my first time using it!
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Floor 4 Posted 2003-03-09 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
It's not set in some file, but by using the SET command to set system environment variables.
DJGPP's most important environment variable is the setting of %DJGPP%, for example:
SET DJGPP=C:\DJGPP\DJGPP.ENV
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2003-03-09 00:00 ·  中国 浙江 宁波 联通
银牌会员
★★★
Credits 1,001
Posts 309
Joined 2002-11-19 00:00
23-year member
UID 283
Gender Male
Status Offline
Right, I forgot about that, hehe
Floor 6 Posted 2003-03-10 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
What should I do if the environment variables are set wrong?
Also, how do I run DJGPP C/C++ 2.03?
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Floor 7 Posted 2003-03-10 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
I already set the environment variables in MS-DOS mode under Windows, but why still can't I run it!
I hope everyone can help me, thanks!
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Floor 8 Posted 2003-03-10 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
You should run the executable files such as GCC.EXE in the BIN folder of DJGPP, for example GCC FILE.C
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 9 Posted 2003-03-10 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
That's exactly what I did, but it still doesn't work! After running it, the screen shows the following message:
gxx: Cannot execute 'gcc.exe'; No such file or directory (ENOENT)
My settings are like this: in the Autoexec.bat batch file in the root directory of drive C, I entered the following:
set bin=c:\DJGPPv23\bin
set include=c:\DJGPPv23\include
set lib=c:\DJGPPv23\lib
set djgpp=c:\DJGPPv23\djgpp.env

Are the above settings correct?
Also, I found that there is no file called gcc in the bin folder, only one called gxx! What's going on?
I hope everyone can help me out, thanks!
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Floor 10 Posted 2003-03-10 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Running the GXX command won't work; you should run the GCC command. Remember that DJGPP is a command-line C compiler, and generally only advanced users use it this way.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 11 Posted 2003-03-12 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
But there is only gxx.exe in the bin folder, there is no gcc.exe at all! If I type the command gcc, the system says it can't find this file!
Sigh, what should I do?
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Floor 12 Posted 2003-03-12 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
You also need to download the file GCCxxx.ZIP (where xxx is the version number). It's very complicated, and I don't recommend beginners use it. Just use an ordinary compiler instead.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 13 Posted 2003-03-12 00:00 ·  中国 河北 石家庄 联通
银牌会员
★★★
Credits 1,835
Posts 648
Joined 2002-11-08 00:00
23-year member
UID 197
Gender Male
Status Offline
Where can I download DJGPP?
Floor 14 Posted 2003-03-12 00:00 ·  中国 河南 信阳 联通
金牌会员
★★★★
龙哥DOS
Credits 4,289
Posts 1,501
Joined 2003-02-23 00:00
23-year member
UID 983
Gender Male
From 河南省
Status Offline
Where can I download the GCCxxx.ZIP file?
Although I'm a newbie, I still want to use DJGPP C/C++ software! I really want an article with detailed DJGPP C/C++ setup instructions! If moderator Wengier has time, could you write one?
I look forward to that day coming, thanks!
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
C++ ☆☆☆ 中国DOS联盟成员 ☆☆☆ C++
C++ ★★★ 爱提问的红色狂想 ★★★ C++
C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
Forum Jump: