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-08-01 01:52
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Now there is a very good programming environment under DOS - DJGPP View 54,257 Replies 136
Floor 61 Posted 2005-11-19 22:39 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
The famous development toolkit Allegro is right in this directory.
Attachments
djgpp内v2tk目录最新包.JPG
Floor 62 Posted 2005-11-19 22:42 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
After I streamlined it, I compressed it. The size of the entire development package was reduced from more than 900 MB to 68 MB. Everyone, don't download useless old stuff.
Attachments
精减后的大小.JPG
Floor 63 Posted 2005-11-19 23:00 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
The subsequent work is how to set up the development environment properly. Unzip all the packages in their respective directories. After unzipping, delete the original compressed package files, and then the latest development environment is formed. But this still can't be used. Some parameters also need to be configured. How can I obtain the latest version? I need to take the file with the largest version number in the same directory and the same series as the latest version. At the same time, those with a suffix of B are also referred to the analysis on the homepage.
Attachments
djgpp的IDE工具.JPG
Floor 64 Posted 2005-11-19 23:05 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
From the above picture, it can be seen that DJGPP has a famous IDE tool called rhide.exe. There are four files along with it, located in the DJGPP\V2apps\bin directory. I ran it and it prompted its latest version, which is version 1.5. In fact, it is just an IDE tool, not a real compiler. It also compiles by calling the compiler.
Floor 65 Posted 2005-11-19 23:12 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
Below, I'll start the IDE tool and see what it looks like.
Attachments
没有设置环境变量启动IDE会有错误.JPG
Floor 66 Posted 2005-11-19 23:14 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
The first screen after startup prompts an error, indicating that the environment variable for djgpp is not set. It asks if you want to continue entering the IDE environment. Since it can't be used even if you enter, so I choose N and return to the DOS platform to set its environment variable. As shown in the figure:
Attachments
设置djgpp的环境变量.JPG
Floor 67 Posted 2005-11-19 23:28 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
After reading the readme.1st file, I found the .djgpp.env file in the djgpp\v2 directory. Under DOS, enter set djgpp=d:\djgpp\v2\djgpp.env as suggested in readme.1st. I installed DJGPP in the root directory of drive D, and everyone should change it according to their own specific installation directory. After setting the variable as shown in the picture, enter djgpp\v2apps\bin\rhide.exe again to open the IDE tool.
Attachments
设置环境变量后的IDE启动界面.JPG
Floor 68 Posted 2005-11-19 23:29 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
After reading the readme.1st file, I found the .djgpp.env file in the djgpp\v2 directory. Under DOS, enter the command as suggested in readme.1st: set djgpp=d:\djgpp\v2\djgpp.env. I installed DJGPP in the root directory of drive D, and everyone should change it according to their own specific installation directory. After setting the variable as shown in the picture, enter djgpp\v2apps\bin\rhide.exe again to open the IDE tool.
Attachments
设置环境变量后的IDE启动界面.JPG
Floor 69 Posted 2005-11-20 00:10 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
Now, let's start writing the first hello world program and experience what's different about djgpp. Hehe. Enter a hello program in the IDE, open the compile menu from the menu to run, as shown in the figure, but the error "bad command or file name" appears. What kind of error is this? Friends familiar with DOS can think that in DOS, if you enter a command that DOS doesn't recognize, the same error occurs. It can be imagined that the IDE also calls an illegal command to DOS. I think it should be that the IDE can't find the path where the compiler program is located. Refer to readme.1st, and the path where the compile command file is located should be added.
Attachments
djgpp的hello程序.JPG
Floor 70 Posted 2005-11-20 00:14 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
First, save it to the current directory. Exit the IDE environment. Set the path of the directory where the compiled file is located. The readme.1st mentions that when compiling the file, use gcc.exe. Check in DOS which directory this command is in.
Attachments
查找gcc所在的路径.JPG
Floor 71 Posted 2005-11-20 00:21 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
In the DOS command prompt, enter `dir gcc.exe /s` to find the path where gcc.exe is located. To set the path for the IDE tool, enter `set path=...` in the DOS command prompt. As shown in the figure:
Attachments
输入dos命令为gcc设置path.JPG
Floor 72 Posted 2005-11-20 00:42 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
After setting up the path, enter RHIDE.EXE again. Open the just-written hello word program. It can be imagined that initially, the path of the library was not set. Netizens who have used TC may think that there should be a special place in the menu to set the paths for lib, include, etc.
Attachments
设置好path以后再次进入编译hello程序.JPG
设置工开发环境的工作目录.JPG
Floor 73 Posted 2005-11-20 00:56 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
Set the include, lib and other paths one by one as in TC with the above figure. How do we know what directories to set? Actually, we can know from the hello word program that #include <stdio.h>. According to the same principle, we check in the directory d:\djgpp\ under DOS to find where stdio.h is. Then we set the include directory in the IDE. Where there is an include directory, there should also be a lib directory. Exit again, and under DOS: d:\djgpp\>dir stdio.h /s, then we can know that the file is in d:\djgpp\v2\include. So the lib is also in d:\djgpp\v2\lib. Enter the include and lib directories respectively in the IDE, as shown in the figure.
Attachments
查找stdio.h所在的目录.JPG
设置include具体路径.JPG
Floor 74 Posted 2005-11-20 00:59 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
The directory of the lib is together with include. Just make a change.
Attachments
设置lib具体路径.JPG
Floor 75 Posted 2005-11-20 01:09 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 52
Posts 26
Joined 2005-11-19 22:04
20-year member
UID 45573
Status Offline
Reopen it carefully. The careful netizens should have seen it. After entering d:\djgpp\v2\lib and opening it again, it becomes d:/djgpp/v2/lib. The IDE tool will automatically convert it. The reason for this is that gun was originally used on the unit system, where paths are represented by "/", while on Windows, paths are represented by "\". This is handled by the IDE itself. We don't need to worry about it. Next, just enter the paths for object and source. Object direction refers to the path where the generated.obj files are stored, such as hello.obj. Source direction refers to the path where the original code is stored, such as hello.c. I default to the current working directory, for example: d:\djgpp\v2apps\bin. When compiling, the compiler will find hello.c according to the current settings, compile it to generate hello.obj, and link it into hello.exe.
Attachments
设置object具体路径.JPG
设置source的路径.JPG
‹ Prev 1 3 4 5 6 7 10 Next ›
Forum Jump: