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-07-31 19:48
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » The DJGPP FAQ list I just finished translating. DigestI View 5,106 Replies 12
Original Poster Posted 2003-09-16 00:00 ·  中国 陕西 西安 电信
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
This list was translated by LEMONHALL in September 2003
EMIAL:LEMONHALL@VIP.SINA.COM
QQ:313813
MSN:LEMONHALL@HOTMAIL.COM


DJGPP Frequently Asked Questions List
Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 Eli Zaretskii.
Third edition of the FAQ list:
The questions in this list apply to DJGPP2.03.
This FAQ list may be freely distributed and used, but please keep the copyright notice intact.

DJGPP FAQ List
**************
DJGPP is a 32-bit compiler and programming environment, originally written for UNIX machines, to meet the needs of the 16-bit MS-DOS operating system. Programmers working in this environment must be familiar with a large amount of UNIX- and DOS-related knowledge. This knowledge is necessary for mastering some of DJGPP's advanced features, such as interrupt handlers and direct access to peripheral devices.

Because the DJGPP project is supported by a group of volunteers in their spare time, you should be able to understand that their time is always in short supply (or they have run out of patience, or lack enough MONEY :-). So they also don't have enough time to write documentation describing the small features and defects that are very useful for beginners. The documentation for many of DJGPP's special tools and features is often pitifully sparse, leaving huge gaps for both beginners and veterans, which invisibly increases the difficulty of learning it.

This FAQ list tries to reduce that difficulty by providing solutions to a large number of questions that confuse beginners. (Another way would be to pay those developers something and force them to write lots of documentation.;-)

Of course there are also some other places where you can find tutorial or guiding materials; we will mention those resources below as well.
One often overlooked document is the DJGPP Knowledge Base. Here is its address
DJGPP Knowledge Base (http://www.delorie.com/djgpp/doc/kb/). You can also access it by typing `info knowledge' at the command line, and DJGPP's user's guide is being written. Although it is still very incomplete, you can already download and browse it on the DJGPP server. Many documents are available in two languages, English and French. Here is the address (http://www.delorie.com/djgpp/doc/ug/).

You can also browse this list online through DJ Delorie's web server on the Internet (http://www.delorie.com/djgpp/v2faq/faq.html). You can also choose to download the FAQ list in a variety of document formats (http://www.delorie.com/djgpp/v2faq/faq230b.zip)

The previous version of the FAQ list has already been translated into French, and is available for users worldwide by FTP,
(ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/frfaq21b.zip)
(http://www.delorie.com/djgpp/v2faq/frfaq21.zip).
Japanese translation version (http://www.bekkoame.or.jp/~bero/faqj/djfaq21j.htm)

It should be stated that: this list is written for DJGPP2.03 users, and was last updated in February 2000

Contents
*****************
DJGPP Frequently Asked Questions List
1 If you're busy
2 What is DJGPP
3 Hardware and software requirements
3.1 Minimum system requirements for using DJGPP
3.2 Can it work under OS/2?
3.3 Can DJGPP work under WINDOWS/NT?
3.4 Can it work under LINUX?
3.5 Can it run on a 286 machine?
3.6 MS-WINDOWS programs and DJGPP
3.7 Recommended machine configuration
3.8 Usual machine configuration
3.9 How do I configure my system to run DJGPP
3.10 How do I configure the maximum memory for DJGPP programs?
4 What needs to be downloaded? Where do I get it?
4.1 Where do I download DJGPP?
4.2 How do I download DJGPP?
4.3 What should I do if I don't understand FTP?
4.4 What needs to be downloaded?
4.5 How much hard disk space do I need to install it?
4.6 How can I save space?
4.7 How to uninstall DJGPP
5 DJGPP documentation
5.1 Where did all the documentation go?
5.2 I don't have the INFO program, how do I read the documentation?
5.3 How do I print the documentation?
5.4 There are some documents I just can't find....
5.5 What is foo.1 for?
5.6 What if these damned documents can't help me?
6 The compiler (MAKE or INFO or whatever) crashed, what should I do?
6.1 GCC or some other DJGPP program hangs
6.2 GCC reports "No DPMI"
6.3 Can bug-ridden DPMI and error-ridden DJGPP.ENV make V.2X programs crash?
6.4 GCC programs may crash during optimization
6.5 Why does GCC say "cannot exec 'as'"? (cannot run the assembler)
6.6 What does "Internal compiler error" mean? (internal compiler error)
6.7 What does "Unknown filetype" mean? (unknown file type)
6.8 The compiler only hangs when running MAKE, what's going on?
6.9 INFO doesn't like certain files?
6.10 INFO crashes as soon as it starts
6.11 Why does BASH crash?
6.12 DJGPP crashes on ThinkPad laptops?
6.12 Why does the linker access the CD-ROM or the network?
6.14 Other problems
6.15 I can't keep up with the error messages
6.16 How to search the DJGPP archives
6.17 How to ask the DJGPP authorities for help
7 Performance of the compiler and linker
7.1 Compilation is too slow
7.2 Linking is too slow
8 Problems during compilation or linking
8.1 GCC can't find the source file
8.2 GCC can't find header files or library files
8.3 GCC can't find C++ header files
8.4 GCC mishandles C++-style comments in C programs
8.5 How does GCC recognize different programming languages?
8.6 Questions about Objective C
8.7 Writing code that only works under DJGPP
8.8 Undefined references when linking a program
8.9 How can I avoid losing all the library header files
8.10 DJGPP uses a one-pass linker
8.11 A few C++ functions have not yet been implemented
8.12 Unresolved djgpp_first_ctor
8.13 C++ programs yield large `.exe' file
8.14 Why are EXE files generated by DJGPP so large?
8.15 Why not use DLL dynamic libraries to make programs smaller?
8.16 The linker can't generate an EXE program
8.17 Failed to compile/install the Allegro or GRX library
8.18 The C++ compiler reports "NULL redefined" (null pointer redefined?)
8.19 Status of support for C++ exception handling
8.20 How GCC generates assembly code
8.21 What's wrong with "sys/movedata.h"?
8.22 How can I build my own library from object files (OBJECT FILE)
8.23 GCC can't find 'stubify'
9 Running compiled programs
9.1 My program crashes only under 2.0
9.2 The program crashes when calling dynamic memory allocation functions (MALLOC and FREE)
9.3 The call stack traceback
9.4 Reading and writing binary files
9.5 Unexpected results when buffering screen I/O
9.6 What do DJGPP programs need in order to run?
9.7 How many file handles can DJGPP use?
9.8 DJGPP and antivirus programs
10 Writing and running graphical programs
10.1 In SVGA mode, what driver should be used when calling GRX
10.2 Accessing video memory
10.3 Saving graphical screens under WINDOWS
10.4 OpenGL and related packages
11 Floating Point and FP Emulation
11.1 Floating-point code without an 80387 math coprocessor
11.2 Floating-point calculations are inaccurate when using the emulator
11.3 Problems running the emulator under WINDOWS
12 Debugging DJGPP programs
12.1 How to run DJGPP programs under the debugger
12.2 How to start debugging from crash information (CRASH DUMP INFO)
12.3 How to debug graphical programs
12.4 GDB only found source code with '.cc'
12.5 Can GDB display class members?
12.6 GDB can't list included source files (#INCLUDE)
12.7 GDB can't display or set static uninitialized variables
12.8 Debugging boolean data
12.9 Debugging complex data types
12.10 The debugger dies (hangs) when debugging certain programs
13 Profiling DJGPP programs
13.1 How to profile a DJGPP program
13.2 A program compiled with the -pg parameter crashes when run
13.3 Gprof produces a misleading profile file
13.4 Why is "__dpmi_int" used so frequently??
13.5 'gprof' doesn't produce any output
14 Runtime performance of DJGPP programs
14.1 How efficient is the code generated by DJGPP?
14.2 Comparison with older versions
14.3 DJGPP runtime efficiency on Pentium machines
14.4 I/O speed of DJGPP programs
14.5 Why does the program I ported run so slowly?
15 Runtime memory problems
15.1 How much virtual memory can I use?
15.2 It seems 'malloc'/'free' can't work on virtual memory
15.3 Can't access more than the available physical memory
15.4 Memory allocation fails before all memory has been used up
15.5 Cases of memory allocation failure under WINDOWS
15.6 Strange cases of memory allocation under WIN9X
15.7 Cases of memory allocation failure with EMM386 and HIMEM installed
15.8 How much memory does a DJGPP parent program leave to its child program??
15.9 How large a heap space can my DJGPP program have??
15.10 Memory-related problems under Windows 98
16 Handling command-line arguments in DJGPP
16.1 DJGPP wildcard expansion for filenames
16.2 How do I disable wildcard expansion of filenames?
16.3 How to pass command-line arguments enclosed in quotes or beginning with @
16.4 How to pass command lines longer than 126 characters
16.5 What is the maximum command-line length in DJGPP?
16.6 Why does the MAKE program pass only 126 characters to the program?
17 Converting DOS programs or libraries into libraries usable by DJGPP
17.1 Legal assembly code that GCC/Gas will not accept....
17.2 Converting between Intel ASM syntax and AT&T syntax
17.3 Converted code GP Faults!
17.4 Problems encountered when writing assembly modules under C/C++
17.5 If I want to use '.obj' or '.lib' in DJGPP
17.6 I *must* use my 16-bit code in DJGPP
17.7 What do I do with those "near" and "far" declarations?
17.8 How to convert the _AX pseudo-register?
18 Low-level DOS/BIOS and hardware-based programs
18.1 Error message "Unsupported INT 0xNN" when calling 'int86'
18.2 How to use buffers for DOS/BIOS services
18.3 How to call real-mode functions
18.4 How to move data between the program area and conventional memory
18.5 How to move structures (data structs) returned by real-mode services?
18.6 Fast access to absolute memory
18.7 Accessing absolute memory above 1MB
18.8 How to let DOS/BIOS call your program (function)
18.9 How to install hardware interrupt hooks (hook hardware interrupts)
18.10 Should I use _go32_XXX or __dpmi_YYY routines?
18.11 Subtleties of hardware interrupt hooks
18.12 Inline assembly in GCC (INLINE ASSEMBLY)
18.13 Using DMA in DJGPP
19 Legal issues
19.1 Legal restrictions on DJGPP programs
19.2 Legal restrictions on DJGPP tools and libraries
20 Getting help
20.1 Don't post questions that are only related to DJGPP itself to GNU newsgroups
20.2 How to post to the DJGPP forum
20.3 How to subscribe to the mailing list
20.4 How to unsubscribe from the mailing list
20.5 Is it okay to post to the mailing list in a language other than English?
21 Comparison between Version 2 and v1.x
21.1 New features in V2
21.2 The environment in V2.X
21.3 Why are new versions of DJGPP released so slowly?
21.4 Where can I find the best C function library for DJGPP?
22 Other
22.1 Problems using RHIDE
22.2 When extracting, it always complains about copying and illegal files
22.3 How to change a DJGPP package
22.4 Where to find DJGPP packages
22.5 How to create a symbolic link for a program?
22.5 How can I find the DPMI specification
22.7 DJGPP's WEB site
22.8 Where to upload my installation package to DJGPP
22.9 Cross-compiling programs
22.10 GCC reports ""garbage at end of number" (junk at end of number???)
22.11 What will sizeof return?
22.12 C++ does not pack structs!!
22.13 How to avoid the fatal error message? ("Abort, Retry, Fail"
22.14 What kind of program is "go32-v2.exe"??
22.15 What is DXE
22.16 Long filenames don't work!!
22.17 Make reports "missing separator"
22.18 Make says `foo' has modification time in the future"
22.19 How to install a Dual DOS/Windows installation????????????????
22.20 What are those 'zone info' directories in the directory for?
22.21 The secret of the /dev/... directory
22.22 How about converting DJGPP object files from COFF to ELF?
22.23 How to generate random numbers?
22.24 What the hell are these noisy characters?
22.25 What value exactly should be returned in the main function of a C/++ program?
22.26 Reboot ?
22.27 Delay execution of a program for a very short period of time
22.28 CGI programming and DJGPP
22.29 Why do I get EOF from STDIN
22.30 Generate the FAQ list file in your favorite format
23 About this list
24 Subject index
25 Program index
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 2 Posted 2003-09-16 00:00 ·  中国 陕西 西安 电信
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
The title seems to have caused a bit of misunderstanding; it should be the table of contents of the DJGPP FAQ list.
I led a small group of about 10 people to do the work of translating DJGPP documentation,
and this is the first result from our group.

Hope it will help everyone with development.
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 3 Posted 2003-09-16 00:00 ·  中国 陕西 西安 电信
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
8.12 Unresolved djgpp_first_ctor
8.13 C++ programs yield large `.exe' file

9.3 The call stack traceback

22.18 Make says `foo' has modification time in the future"

As for the translation of these three lines, my group and I are also still studying them. I wonder if anyone can come up with a better translation?
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 4 Posted 2003-09-16 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
I'm quite interested in this "translation group"... could you introduce some specific details about this "group"?
Wengier - 新DOS时代

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

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

Floor 5 Posted 2003-09-16 00:00 ·  中国 陕西 西安 电信
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
It's a small project within a cooperative development project. I'm only the initiator, and also responsible for maintenance.
Information is released regularly; the main trouble is not having stable web space, so we have no choice but to use EMAIL
to exchange project files. A very old-fashioned method, but it really works.

The project is progressing slowly at the moment. I am drafting standardized documentation standards for the project,
but the translation work on the FAQ list is also moving forward at the same time.
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 6 Posted 2003-09-16 00:00 ·  中国 陕西 西安 电信
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
http://home.fei-cg.com/lemonhall/index.htm
This is a site I just made (maybe calling it a webpage would be more appropriate, hehe)
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 7 Posted 2003-09-16 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
23-year member
UID 7391
Gender Male
From 福建省
Status Offline
Support
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 8 Posted 2003-09-16 00:00 ·  中国 台湾 远传电信
元老会员
★★★★★
Credits 8,312
Posts 3,551
Joined 2003-03-22 00:00
23-year member
UID 1225
Gender Male
Status Offline
Thank you all
MSN:tiqit2@hotmail.com
Floor 9 Posted 2003-09-16 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
How about making it an affiliated DOS website of the "China DOS Union"?
Wengier - 新DOS时代

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

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

Floor 10 Posted 2003-09-17 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
Wengier, not a bad idea. I strongly support doing that!
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 11 Posted 2003-09-17 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
23-year member
UID 7391
Gender Male
From 福建省
Status Offline
Strongly support it! If it can be done, that would be a very good thing.
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 12 Posted 2003-09-17 00:00 ·  中国 内蒙古 呼和浩特 移动
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
Thank you all for your support, my website will keep getting better and better with your encouragement.
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 13 Posted 2003-09-19 00:00 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 109
Posts 3
Joined 2003-09-19 00:00
22-year member
UID 10030
Gender Male
Status Offline
I support it
Forum Jump: