⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.1st

📁 嵌入式系统基础课件
💻 1ST
📖 第 1 页 / 共 2 页
字号:

               ######         #   #####   ######   ######
               #     #        #  #     #  #     #  #     #
               #     #        #  #        #     #  #     #
               #     #        #  #  ####  ######   ######
               #     #  #     #  #     #  #        #
               #     #  #     #  #     #  #        #
               ######    #####    #####   #        #

                              DJ Delorie


          This is the README.1ST file for DJGPP Version 2.03

************************************************************************
*  This file contains information on obtaining, installing, and using  *
*  DJGPP.  Please read it *completely* before asking for help.         *
************************************************************************

DJGPP is a non-proprietary environment for developing 32-bit protected
mode software in C/C++ under MS-DOS.  The DJGPP home page on the WWW
is:
	http://www.delorie.com/djgpp/

Status and other information (online docs, FAQ, mail archives) are
made available through the DJGPP web pages.  Discussion of DJGPP and
questions about its usage or features are through the djgpp news group
(post to comp.os.msdos.djgpp) and djgpp mailing list (send your
messages to <djgpp@delorie.com>, subscribe through
<listserv@delorie.com>).  Look on the web page for information on the
latest versions of various DJGPP packages.

Version information is in manifest/*.ver within each zip.  Contents
are in manifest/*.mft in each zip.

There are also alternate (and usually better) tutorials on getting,
setting up, and using djgpp available on the World Wide Web:

	http://www.delorie.com/djgpp/doc/



THE DISTRIBUTION
****************

The DJGPP distribution is broken into a few subdirectories, by
content.  Each subdirectory has a file called 00_index.txt that
contains descriptions of each of the files in that directory.

The 'b' zips include the binaries and on-line documentation.  At the
time of writing this file, the various packages are:

FAQ      A short file which points you to other documents you should
           read (including the full FAQ list).

v2/
unzip32  A free program to unzip the archive (like PKUNZIP) 
djdev203 DJGPP V2 Development Kit and Runtime
djlsr203 DJGPP V2 Base Library Sources
djtst203 DJGPP V2 Test Programs (for testing the C library)
djcrx203 DJGPP V2 Cross-to-DOS Compiler Support Files (from djlsr/djdev)
djtzn203 DJGPP V2 Timezone Files
djtzs203 DJGPP V2 Timezone Sources
faq*b    The full FAQ list in various formats (Info, ASCII, HTML...)
faq*s    The Texinfo sources of the FAQ and tools to generate all the
          different formats of the FAQ
frfaq*   DJGPP FAQ en Francais

v2apps/
(various applications built with/for DJGPP, like RHIDE and TeX)

v2gnu/
(ports of various FSF/GNU programs to DJGPP, like gcc and binutils)

v2tk/
(various toolkits for use with DJGPP, like Allegro and libsocket)

v2misc/
csdpmi* CWSDPMI, Charles Sandmann's free DPMI server binaries and docs
mlp*    ML's Executable File Packer Binaries ("djp")
pmode*  PMODE stub for djgpp V2
wmemu*  WM's alternative 387 emulator binaries for DJGPP V2
(and other miscellaneous things to use with DJGPP)



GETTING STARTED
***************

The info below is the minimum new users should know to get them up and
running with DJGPP.  Please read the DJGPP documentation and the FAQ
list for further details.  New users are encouraged to read the FAQ
list in its entirety.



What to download
----------------

See http://www.delorie.com/djgpp/zip-picker.html for a form-based
guide to what to download.  In general, download the binary
distributions only; most people don't need the source distributions.

To build C programs, you'll need djdev203.zip, gcc*b.zip, and
bnu*b.zip.  For C++, also get gpp*b.zip.

To read the online manuals, get txi*b.zip and run "info".  If you don't
have a DPMI server installed, you'll need csdpmi*b.zip.  (Windows, QDPMI,
386Max, NWDOS, OpenDOS, OS/2, Win/NT and Linux DOSEmu all provide DPMI
services, so you don't need CWSDPMI in those environments.)  For more
details, download faq*b.zip (the full FAQ list) and read Chapter 4,
"Where and What to Download".


Installation
------------

1. Create a directory for DJGPP, say C:\DJGPP.  (WARNING: do NOT
   install DJGPP in a directory C:\DEV, D:\DEV, etc., or in any of their
   subdirectories: it will not work!  See the FAQ for more details.)

   If you have version 1.x installed, it's best to delete the contents
   of its `bin/' subdirectory or move it to another directory (not on
   your PATH), and delete everything else from that installation.
   (Some of the problems reported by users of DJGPP v2 were caused by
   inadvertently mixing it with old v1.x programs.)  The only program
   from v1.x that you should keep is `go32.exe'.

2. Unzip all the zip files from that directory, preserving the
   directory structure.  For example:

	pkunzip -d djdev203
  or
	unzip32 djdev203

   On Windows 9X, use an unzip program which supports long file names.
   Latest versions of InfoZip's UnZip and PKUnZip, as well as WinZip,
   all support long file names.  unzip32.exe, available from the DJGPP
   sites, also supports long file names.  One way to make sure you have
   preserved long file names is to look for a file include/sys/sysmacros.h:
   if you see only sysmacro.h instead, your unzip program does NOT
   support long filenames, and you need to find another one.

3. After unzipping all the zip files, set the DJGPP environment
   variable to point to the file DJGPP.ENV in the main DJGPP
   installation directory and add its BIN subdirectory to your PATH.

   The exact way how these variables should be set depends on your
   operating system:

   * For Windows 98 systems:

     - Click START;
     - Choose Programs->Accessories->System Tools->System Information;
     - Click Tools in the menu-bar, then choose "System Confuguration";
     - Use the tab provided there for editing your AUTOEXEC.BAT as
       explained below.

   * For Windows NT systems:

     - Right-click "My Computer", then select "Properties";
     - Click the "Environment" tab;
     - Edit the PATH system variable to add the DJGPP bin subdirectory;
     - Add a new variable DJGPP and set its value to the full path
       name of the DJGPP.ENV file as explained below.

   * For all other systems (DOS, Windows 3.X and Windows 95): use any
     text editor, e.g. the standard EDIT, to edit the file
     AUTOEXEC.BAT in the root directory of the boot drive (usually,
     C:).

   No matter which method you use, assuming your DJGPP installation is
   rooted at C:\DJGPP, the values of the two environment variables
   DJGPP and PATH should be set like this:

	set DJGPP=C:\DJGPP\DJGPP.ENV
	set PATH=C:\DJGPP\BIN;%PATH%

4. Reboot.  This makes sure the two lines you added to autoexec.bat
   will take effect.  (On Windows NT, the changes take effect
   immediately, so you you don't need to reboot there.)

5. Run the go32-v2.exe program without arguments:

	go32-v2

   It should report how much DPMI memory and swap space can DJGPP use
   on you system, like this:

	DPMI memory available: 8020 Kb
	DPMI swap space available: 39413 Kb

   The actual numbers will vary according to amount of RAM installed
   on your system, the available disk space and the DPMI server.  If
   the sum of the two numbers reported by go32-v2 is less than 4MB,
   read section 3.9 of the FAQ, "How to configure your system for
   DJGPP".  (If you have more than that, but want to get the optimal
   performance from your system, read that section anyway.)


Compilation
-----------

GCC is a command-line compiler which you invoke from the DOS command
line.  To compile and link a single-file C program, use a command like
this:

	gcc myfile.c -o myfile.exe -lm

The -lm links in the lib/libm.a library (trig math) if needed.  (Link
order is significant, so if you need libm.a, always put `-lm' at the
end of the command line.)

To compile a C or C++ source file into an object file, use this
command line:

	gcc -c -Wall myfile.c  (for C source)
  or
	gcc -c -Wall myfile.cc (for C++ source)

This produces the object file myfile.o.  The `-Wall' switch turns on
many useful warning messages which are especially beneficial for new
users of GCC.  (Other C++ extensions, like .cpp, are also supported,
see section 8.4 of the FAQ, "How does GCC recognize the source
language", for details.)

To link several C object files into an executable program, use a
command line such as this:

	gcc -o myprog.exe mymain.o mysub1.o mysub2.o

This produces `myprog.exe' which can be run from the DOS prompt.

To link a C++ program, use gxx instead of gcc, like this:

	gxx -o myprog.exe mymain.o mysub1.o mysub2.o

This will automatically search the C++ libraries, so you won't need to
mention them on the command line.

You can also combine the compilation and link steps, like this:

	gcc -Wall -o myprog.exe mymain.c mysub1.c mysub2.c

Further info about the plethora of GCC switches can be found in the
GCC on-line documentation.  To begin reading it, install the Texinfo
package (txi*b.zip, see the ``On-line docs'' section below) and type
this:

	info gcc invoking



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -