DEV-CPP Small Guide, Originally published in 9CBS Forum

xiaoxiao2021-03-06  79

DEV-CPP is a GCC's IDE program under Win32, written in Dephi 5, only 2M has the following functions:

1. Integrate compilation environments, support engineering templates. 2. Support syntax, automatic comment, support for Chinese support. 3. Support CVS integration 4. Support source analysis, can form a tree map. 5. Support extension package.

DEV-CPP officially issued an integrated MINGW32 GCC compilation kit, and the latest support for GCC 3.3 (2003-7-15) can also support each version of MINGW other versions and Cygwin GCC. However, you need to manually set.

DEV-CPP supports multilingual environment, the Chinese version is maintained by my friend Nyra (Nyra@sohu.com). If you find that the Chinese version has a release problem to find her. If you are interested in the translation help file, please contact it.

DEV-CPP has two common versions, one is 5.0beta in the development, the latest version is 4.01 is 4.01, which is a revised version of 4.0 (which integrates GCC 2.9.5), the former is more functions, and the latter More stable.

I don't have much to say, and the usage of VC is similar. In fact, you have more problems in the GCC itself. GCC, GCC and GCC different things. The former is the compilation environment of GNU, including GCC, G , GCJ and other kinds A system compilation tool such as a language compiler and AS (assembly), AR (library), LD (coupler). GCC is a compiler in the C language in GCC, G is a C language compiler.

GCC is ported to a variety of operating systems, the most famous of Win32 is MINGW and Cygwin two versions, and the full name of MINGW is Minial GCC for Windows, such as the title, which is a small GCC on Win32, including least the least GCC component < 10M and Cygwin is a large system of Unix On Windows. All downloads have more than 300 megabits. Most of the software under Unix has a transplanted version in Cygwin, including X-windows. There is also a GCC, name called for DOS-32. DJGPP, similar to MINGW, is similar to it is a Latest GCC that can be run in non-Win32 environments (such as FREEDOS) in non-Win32 environments (such as FREEDOS).

The following focuses on GCC 3.2 and MingW transplanted version.

GCC3.2 (G ) is called the C standard to support the best C compiler, which is really not bad. (Because VC7.0 also said it is), but it is clear that G only supports without special configuration. Standard C syntax, no longer supports early non-standard C syntax. So many C programs under VC cannot run. BC 3.1 (the target platform of many textbooks) is not supported. So, please ask Why my program can run in the XX compiler, and before the DEV-CPP cannot be compiled, first check your program is not true.

DEV-CPP uses G compilation by default with CPP, CXX, so if your C language program is expanded in C, otherwise it is likely to be wrong, please remember that C and C are two unable to speak. They are not completely compatible. C standard is C 98, and the language of the language is C99, but they have to charge, recommend BS C Programming Language is a standard reference book for C . Of course, if the C 98 standard is not bad. .

Mingw includes: GCC, G , GDB and Binary Utils and a MSYS environment (download separately), the previous items are command line programs. MingW In addition to standard C libraries and standard C libraries, it includes a Win32 library called W32API and OpenGL Library.

The directory structure is as follows: (if you download DEVCPP, they in DEV-CPP / MINGW32 directory / bin executable (shell) / include header file / mingw / usr / (true) executable program / lib library

DEV-CPP default installation, the relevant paths have been set. It is difficult to compile if it is not set. The setting method is set in the Options / Compile Environment menu. Note that the new C header is answering some questions below /nclude/g /3.2/ below:

1. More friends asked to make graphics in DEVC , sorry, DEVC does not have a graphics.h file, it seems that you can't make a picture (specific solution, expecting master supplements .....) Graphics.h is Borland's DOS graphics library The header file, Win32 does not support, please use the Win32 drawing method GDI or DirectDraw.

2. DEV C is to do DLL with DLLWrap.exe (the original words is like this, expecting masters ....... Yes, DLLWRAP syntax is: DLLWRAP option target file (ie * .o) common options : --DEF DEF file name - DLLNAME DLL Name - IMPLIB Output DLL Import Library

3. About the reference to the library's reference GCC name is libXXX.A where xxx is the library name, which only needs to add option -lxxx when compiling. The GCC's target file is different from the Coff used by the VC and the OMF format used by Borland. It cannot be used directly. You need to recompile the generation .a library.

The GCC library management program is Ar, and its usage is: AR RCS library sees the name .a target file. Oh, some people said :)

4. The debugging of debugging and target files. DEV-CPP debugging has not been very easy, because it is not directly debugging, but calls the gdb command line program, so there is no breakpoint, sometimes there is The statement does not execute, so the feeling of chaotics, in fact, as long as it takes a closer look, it does not perform and not breaking the point, it is very reasonable, unlike the VC can break the point in the air line. Target file Very large because of the standard IO library, the new standard IO library is generated by the full template, so the static library is quite large. The GCC has not made it a dynamic library, so each program is connected to hundredsK. The GCC template is also very stupid (or for the forgel standard), the target program is very large. But there is a Strip program in mingw. You can lose weight for it. There are several ways to produce a small program: 0 Optimizer !!!! 1. All dynamic libraries, including C run libraries .2. Do not debug Options .3. Using the optimization options for program size.

.

转载请注明原文地址:https://www.9cbs.com/read-97936.html

New Post(0)