Duanxx C ++: cc file introduction in linux, duanxxcc

Source: Internet
Author: User

Duanxx C ++: cc file introduction in linux, duanxxcc


For historical reasons, a long time ago, the extension of the C ++ source file was *. c, but this caused many problems.

So different predecessors thought of different methods to solve this problem: they changed the suffix of the C ++ file to *. cc *. cpp *. cxx, etc.


Today, except for Unix systems, the extension names of C ++ files on other platforms are basically *. cpp, but Unix systems still tend to use *. cc is the extension name of the C ++ file. For example, you can see a lot when viewing Unix or Linux kernel *. cc File

 

I saw in Google C ++ Sytle that Google's C ++ suffix also tends to use *. cc.

Google C ++ specifications link: http://google-styleguide.googlecode.com/svn/trunk/cppguide.html

 

 

For header files, *. hpp *. hh is also written, but it is basically used *. h, which has not changed.

 

Note that when writing C ++ code, there are a lot of code gods like to use template files (template source) and inline functions (inline functions) the source file is stored with another special suffix, for example :*. tcc and *. inl

 

 

The following lists the possible extensions of C ++ files in different environments.


Unix uses: C, cc, cxx, c

Gnu c ++ uses: C, cc, cxx, cpp, c ++

Digital Mars uses: cpp, cxx

Borland C ++ uses: cpp

Watcom uses: cpp

Microsoft Visual C ++ uses: cpp, cxx, cc

Metrowerks CodeWarrior uses: cpp, cp, cc, cxx, c ++

 


C Programming in linux, for example, the C file is mainc

Upstairs means that you have source code and compiled and generated an assembly file. Of course you can view the assembly code;
However, if you get a binary file, obj, or other executable file, you do not have the source code. In this case, you want to analyze the file information and Assembly source code, only through the above command... This is a bit like reverse engineering in Windows (multiple open-source projects in Linux, so there are many reverse engineering projects in win ).

For example:
Objdump-x obj organizes (divided into several blocks) the data of the target document in the form of some classification information.
Objdump-t obj: symbol table of the output target document
Objdump-h obj output section Summary of the target document
-----------------------------------------------------------------------
You should take a look at the objdump, and you will know its specific purpose.

Tools provided in Windows include Microsoft's dumpbin.exe
Dumpbin xx.exe/exports> exports.txt

In Linux, what are the parameters of C compiler cc?

In Linux, cc is gcc ......

You can go to gcc.gnu.org to check the gcc documentation. The parameters are too many and dizzy.
Gcc.gnu.org/..ng-gcc

Related Article

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.