Linux C/C ++ development tools

Source: Internet
Author: User

From: http://hi.baidu.com/%D4%AC%C2%ED%BE%FC/blog/item/3f70d639810daf2e96ddd8be.html

 

I was a C Program He is also a Windows programmer. He works with Microsoft tools such as vc6.0 and vs2005 in windows. He is so familiar with the quick operations of VC 6.0/vs2005, it can be said that VC 6.0/vs2005 is the best tool for C/C ++ development in windows. You can view the call stack, memory changes, and variable values, in addition, after visual assist X is installed, the VC looks so perfect. But written in Windows Code In Linux, there is a problem. Therefore, we recommend that you set tool-> Option-> tab size 4 in VC and insert spaces. The other problem is that the carriage return line breaks, for example, in Windows, it is 0d and 0a. in Linux, Vi can see ^ m, which makes it inconvenient for others. Therefore, if the submitted server is Linux and you are developing it in windows, you can set it in SVN/CVS to automatically perform the dos2unix conversion. You can view the relevant manuals of SVN/cvs for relevant documents. I was lucky enough to switch to Linux for development this time. I was lucky enough to get to know Linux, but it came with a particularly headache: what tools are used for coding, compiling, and debugging in Linux ?? I was very confused, and then I went online for a big search. When I saw so many netizens recommending vim, I was very disappointed. Then I used Vim for an afternoon, I felt particularly uncomfortable when my hands were numb, just like using chopsticks in my left hand. I still plan to look for it again. However, I found a suitable tool. Haha, I am so happy. Today, I will sort out some of the information I have collected over the past few days and give some tips to programmers who will switch to Linux in the future! The main tool is as follows: 1. VIM + ctags + taglist + cs.pdf + cppcomplete + global this I also tried, the more useful post is as follows: http://www.linuxsir.org/bbs/showthread.php? T = 241578 http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx but this should remember a lot of commands, but fortunately, these commands have two or three days to remember, I have a simple example: 2, text operations ~: E! File1: edit the new file in the current file: R/etc/passwd to implement the File Reading function: WQ keep and exit: Q! Forced Exit O: re-start a row U: Undo: C-R: redo dd delete a row d $ E: Move the word Ge regular ----- -- à e %: brackets match 33g: jump to 33 rows GG: jump back to the first line C-O/C-I jump back and forth H-home l-Last Ma: Define tag a, 'a: back to a C-V text block Operation // match the entire word: N next YY: copy a row, P: paste ^ jump the cursor to the first line of the line quickly $ jump the cursor to the end of the line quickly: m, NY copies the text between Row M and row n to VI buffer 5.3. replace operation: S/old/new Replace the first character of the current row, old, with the character New: s/old/new/g replace all characters of the current line. Old is the character New: m, NS/old/new/g replace all the characters from the current row number M to the row number n old with the character New: % S/old/new/g replace all characters of the entire text. Old is the character New 5.7, use Replacement confirmation function: S/old/new/C replaces the first character of the current row with the old character with the new character and prompts the user to confirm the operation: s/old/new/GC replace all characters of the current row. Old is the new character, and the user is prompted to confirm the operation: m, NS/old/new/GC replaces all the characters from the current row number M to the row number n. The old character is the new character and prompts the user to confirm the operation: % S/old/new/GC replace all characters of the entire text. Old is the new character and prompts the user to confirm the operation: Edit foo.txt --- edit another document: next to the file switch C-W switch window vimdiff main. C ~ Main. c: G + // + S/foobar/barfoo/g ctags: ctags-r/ctags *: Set tags = /.. /tags jump definition, jump back: tlist F3 search: Make: CW: CN: CP mm tag, F2 switch cs1_rbq: CS Add /.. /cscope. out /.. /: CS find g xxx: CS find C vim_strsave: CW press the tab key to automatically complete. The disadvantage is: it is troublesome to automatically complete the function. You must first set up ctags. It is still very tiring to write code. I wrote it for one afternoon and all my hands are paralyzed. Error Check, automatic matching of parentheses, and full-featured word complementing are not satisfied, and C ++ is not supported well. For example, I have just written two configurations. h, config. CPP: No CTAG or cssag operations are performed on these two files. Therefore, the word cannot be supplemented, and the matching of parentheses cannot be detected. I don't know whether the configuration is correct or what is going on. In addition, debugging is not supported, so I can only give up. 2. emacs + plug-in can view the http://blog.163.com/yu_hongchang/blog/static/3989413820081121512613/ I did not test, it is estimated that the same as vim, are command operations, I heard that this function is more powerful, able to debug through xterm, this I used before, but the xterm is really not very easy to use. I don't like the interface or mouse. 3. kdevelop is a poor tool, and I don't like it either. For example, its auto-completion function is uncomfortable. For example, there is a function int test (INT C1, int C2) when we knock on the TES, only test is available, and the parameter list below cannot be displayed. Therefore, when the amount of code is large and the number of function parameters is large, we cannot remember the parameters, if no parameter list prompt is displayed, you will feel uncomfortable. But fortunately, it integrates kgdb for debugging. 4. eclipse + CDT many people use this ide. It's okay, but eclipse is a Java, and the running speed is very slow. In addition, the word complementing function is too bad, and only the structure or class can be supplemented, write down. /-> then you can complete the Code. In addition, you must press control +/to complete the code. It cannot be automatically displayed when the code is typed, eclipse's support for C/C ++ is far less powerful than that for Java, but at least I think it is more comfortable than writing in Vim, it may be that I am used to the IDE's working environment. 5. Code: blocks can view: http://www.codeblocks.org/support platform is not complete, my RedHat Enterprise 5.0, It is not installed, so I did not have a look at it, unfortunately. 6. anjuta I downloaded the installation is not available, do not know why, and require more configuration, also more trouble, if you are interested, you can see http://hi.baidu.com/my2008space/blog/item/140de5255fab81084c088d1e.html 7. kylix this did not try. 8. netbeans is also good. I installed it and tried it. It can satisfy my functions, but it can be customized slightly, but it can meet the needs. It is also good, if there is no slick edit mentioned below, I will select it. 9. Windows ue + SSH many people use this method. I don't like it very much. Maybe I don't like the UE interface. It should be similar to vim. 10. slick EDIT: Well, I finally chose this option. It is very easy to use, customizable, supports many languages, and is very easy to use. It can be used for debugging directly, and the speed is fast, the interface is very similar to VC 6.0. It is the only tool that can rival VC, but it is not free of charge. But thanks to the hackers, the software has been cracked, you can download through the following link: http://www.slickedit.com/content/view/409/239/ download slickedit v14.0.2.2 then go to the http://download.csdn.net/source/1481066 to download the cracked file, then override it. This tool is very useful. You can try it. The best part of this tool is to view the memory situation. I like this. Haha 11. the main compilation tools of the compilation tool and debug tool are GCC. When the code size is large, makefile should be written. In addition, the debugging tools are mostly GDB. These visual ides basically wrap GCC, GDB. So slickedit is undoubtedly a life-saving tool for me who just switched to Linux and who are not familiar with makefile. It can quickly turn me into work. Of course, you just use it as a tool for editing, and you will find that it can greatly reduce your coding time, so that your hands will not feel tired of writing code. Finally, the dust settled. I will use slickedit to start my Linux journey later.

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.