中国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-10-31 06:27
47,815 topics / 349,930 posts / today 0 new / 48,290 members
DOS开发编程 & 发展交流 (开发室) » Now there is a very good programming environment under DOS - DJGPP
Printable Version  56,920 / 136
Floor61 lucky9981 Posted 2005-11-19 22:39
初级用户 Posts 26 Credits 52
The famous development toolkit Allegro is right in this directory.

Attachments
djgpp内v2tk目录最新包.JPG (44.42 KiB)
Floor62 lucky9981 Posted 2005-11-19 22:42
初级用户 Posts 26 Credits 52
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 (23.61 KiB)
Floor63 lucky9981 Posted 2005-11-19 23:00
初级用户 Posts 26 Credits 52
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 (44.47 KiB)
Floor64 lucky9981 Posted 2005-11-19 23:05
初级用户 Posts 26 Credits 52
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.
Floor65 lucky9981 Posted 2005-11-19 23:12
初级用户 Posts 26 Credits 52
Below, I'll start the IDE tool and see what it looks like.

Attachments
没有设置环境变量启动IDE会有错误.JPG (81.23 KiB)
Floor66 lucky9981 Posted 2005-11-19 23:14
初级用户 Posts 26 Credits 52
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 (29.29 KiB)
Floor67 lucky9981 Posted 2005-11-19 23:28
初级用户 Posts 26 Credits 52
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 (68.6 KiB)
Floor68 lucky9981 Posted 2005-11-19 23:29
初级用户 Posts 26 Credits 52
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 (68.6 KiB)
Floor69 lucky9981 Posted 2005-11-20 00:10
初级用户 Posts 26 Credits 52
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 (45.77 KiB)
Floor70 lucky9981 Posted 2005-11-20 00:14
初级用户 Posts 26 Credits 52
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 (27.84 KiB)
Floor71 lucky9981 Posted 2005-11-20 00:21
初级用户 Posts 26 Credits 52
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 (30.28 KiB)
Floor72 lucky9981 Posted 2005-11-20 00:42
初级用户 Posts 26 Credits 52
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 (44.7 KiB)
设置工开发环境的工作目录.JPG (45.11 KiB)
Floor73 lucky9981 Posted 2005-11-20 00:56
初级用户 Posts 26 Credits 52
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 (28.59 KiB)
设置include具体路径.JPG (48.1 KiB)
Floor74 lucky9981 Posted 2005-11-20 00:59
初级用户 Posts 26 Credits 52
The directory of the lib is together with include. Just make a change.

Attachments
设置lib具体路径.JPG (47.8 KiB)
Floor75 lucky9981 Posted 2005-11-20 01:09
初级用户 Posts 26 Credits 52
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 (48.13 KiB)
设置source的路径.JPG (48.05 KiB)
Prev  1 … 2 3 4 5 6 7 8 … 10  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023