Dev-CPP small guide, originally published on the csdn Forum

Source: Internet
Author: User

Dev-CPP is an IDE with GCC under Win32.Program, Written in dephi 5, only 2 m
Has the following features:

1. Integrated compilation environment, supporting engineering templates.
2. Support for high syntax and automatic annotation, and good support for Chinese.
3. Support for CVS Integration
4. Supports source code analysis to form tree charts.
5. Support for extension packages.

Dev-CPP is officially released with the integration of mingw32 GCC compilation kit, the latest support for GCC 3.3)
Other mingw versions and cygwin GCC versions are also supported. However, you need to manually set them.

Dev-CPP supports multi-language environment, the Chinese version of the interface is maintained by my friend Nyra (nyra@sohu.com), if
If you have any questions about the Chinese version, contact her. If you are interested in translating help files, contact us.

Dev-CPP has two common versions. One is 5.0 Beta in development, and the latest version is 4.9.8.0.
The other version is 4.01, which is a modified version of 4.0 (with GCC 2.9.5 integrated). The former has many functions while the latter is relatively stable.

I will not say much about the graphical environment. It is similar to VC usage. In fact, most of the problems are caused by GCC itself.

GCC, GCC, and GCC are different. The former is the GNU compiling environment, including GCC, G ++, gcj, and other compilers in multiple languages.
And as (assembly), AR (Library), LD (connector) and other system compilation tools. GCC is the C language compiler in GCC, G ++ is
C ++ language compiler.

GCC has been transplanted to multiple operating systems. On win32, the most famous versions are mingw and cygwin. The full name of mingw is
Minial GCC for Windows. For example, it is a small GCC on Win32 and only contains the minimum GCC component <10 m
Cygwin is a UNIX on Windows system. It downloads more than 300 MB of software and most software in UNIX.
In cygwin, there is a portable version, including X-Windows. There is also a GCC for DOS-32, called djgpp, and
The target is similar. The difference is that it is a Mz-oriented program that can run in a non-Win32 environment (such as freedos)
They all moved to the latest GCC version officially released by GCC.

Next we will focus on GCC 3.2 and mingw.

Gcc3.2 (G ++) is known as the best C ++ compiler to support the C ++ standard. It is true (because vc7.0 also said it is)
It is clear that, without special configuration, G ++ only supports the Standard C ++ syntax, and does not
C ++ syntax is supported. Therefore, many c ++ programs under VC cannot run. BC ++ 3.1 (the target platform of many textbooks)
Is not supported. Therefore, please ask why my program can run in XX compiler, and go to Dev-CPP
Before compilation or other issues, check whether your program is true.

Dev-CPP uses g ++ to compile files with CPP and cxx extensions by default. Therefore, if your C language program is expanded with C extension
Otherwise, errors may occur. Remember that C and C ++ are not fully compatible with each other.
The C ++ standard is C ++ 98, and the new language standard is c99, but they all charge fees. We recommend B. S. c ++ programming.
Language is a reference to C ++ standards. Of course, it would be nice to use C ++ 98 as a reference.

Mingw includes GCC, G ++, GDB, binary utils, and an msys environment (for separate download). The preceding items are command lines.
In addition to the standard C ++ library and Standard C library, mingw also includes a Win32 library and OpenGL library called w32api.

The directory structure is as follows: (if you download devcpp, they are in the dev-CPP/mingw32 directory.
/Bin executable program (Shell)
/Include header file
/Mingw
/Usr/(real) executable program
/Lib Library

In the default installation of Dev-CPP, related paths have been set. If not, it is difficult to compile.
The setting method is set in the options/compiling environment menu.
Note that the new C ++ header file is under/include/g ++/3.2 /.

Below are some questions:

1. many of my friends asked about the graphics below devc ++. Sorry, devc ++ does not have graphics. h file, it seems that it cannot be mapped (the specific solution is expected to be supplemented by experts .....)
Graphics. H is the header file of Borland's dos graphics library, which is not supported under Win32. Use the Win32 drawing method GDI or DirectDraw.

2. Dev C ++ uses dllwrap.exe as the DLL (the original is like this, hope you can explain it .......
Yes, the dllwrap syntax is:
Dllwrap option target file (that is, *. O)
Common options include:
-- Def <FILENAME> def file name
-- Dllname <Name> DLL name
-- Implib <import lib Name> export DLL to database

3. Database reference
The GCC library name is libxxx. A, where XXX is the library name. You only need to add the option-LXXX during compilation. The target GCC file and
The coff format used by VC and OMF format used by Borland are different and cannot be used directly. You need to re-compile the. A library.

The GCC library management program is Ar. Its usage is: Ar RC library file named. A target file. O, someone has said :)

4. About debugging and target file size.
Dev-CPP debugging has never been very useful because it does not directly debug, but calls the command line program GDB,
So in some places, the breakpoint is not hit, and sometimes some statements are not executed, so the feeling of jumping is as long as you carefully
Observe that it does not execute or cannot open a breakpoint, it is a good reason, unlike VC can also open a breakpoint on a blank line.
The target file is large because the standard Io Library and the new standard Io library are all generated using templates, so the static library is quite large.
GCC has never made it a dynamic library, so every time the program is connected to hundreds of K. In addition, the generation of the GCC template is also
Very stupid (or to add standards), so the target program is very large, but there is a strip program in mingw.
It can be used to lose weight.
There are several ways to generate a small program:
0. optimization program !!!!
1. Use dynamic libraries, including C Runtime libraries.
2. Do not debug the options.
3. Use Program-oriented optimization options.

 

 

 

 

 

.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.