中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-15 02:56
47,812 topics / 349,917 posts / today 0 new / 48,268 members
DOS软件下载 & 游戏分享 (下载室) » How to run the main program of DJGPP C/C++ 2.03?
Printable Version  2,071 / 13
Floor1 红色狂想 Posted 2003-03-09 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
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!
Floor2 imp Posted 2003-03-09 00:00
银牌会员 Posts 309 Credits 1,001
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
Floor3 红色狂想 Posted 2003-03-09 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
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!
Floor4 Wengier Posted 2003-03-09 00:00
系统支持 Posts 10,521 Credits 27,736
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
Floor5 imp Posted 2003-03-09 00:00
银牌会员 Posts 309 Credits 1,001
Right, I forgot about that, hehe
Floor6 红色狂想 Posted 2003-03-10 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
What should I do if the environment variables are set wrong?
Also, how do I run DJGPP C/C++ 2.03?
Floor7 红色狂想 Posted 2003-03-10 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
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!
Floor8 Wengier Posted 2003-03-10 00:00
系统支持 Posts 10,521 Credits 27,736
You should run the executable files such as GCC.EXE in the BIN folder of DJGPP, for example GCC FILE.C
Floor9 红色狂想 Posted 2003-03-10 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
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!
Floor10 Wengier Posted 2003-03-10 00:00
系统支持 Posts 10,521 Credits 27,736
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.
Floor11 红色狂想 Posted 2003-03-12 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
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?
Floor12 Wengier Posted 2003-03-12 00:00
系统支持 Posts 10,521 Credits 27,736
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.
Floor13 LanE Posted 2003-03-12 00:00
银牌会员 Posts 648 Credits 1,835
Where can I download DJGPP?
Floor14 红色狂想 Posted 2003-03-12 00:00
金牌会员 Posts 1,501 Credits 4,289 From 河南省
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!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023