I believe that anyone who has been familiar with Linux must have used vim, a powerful text editor. As long as GCC is definitely used for writing C language in Linux, I haven't been familiar with Linux for a long time, but I think these two things are really good. If you write a simple C languageProgramIs it difficult to open a virtual machine every time? Can I use vim and GCC to develop C language programs in windows? Yes.
1. Prepare the vim editor. There is an excellent gvim text editor in windows, which features the same as Linux and is more powerful. Baidu downloads the package and installs the package. Do you feel familiar with opening the package? Just like Linux. But what is lacking in the United States is that it is not like Linux to directly input Vim in the Command window, in fact, this is also very simple, right-click my computer-> properties-> advanced-> environment variables, double-click path in the system variable, add a semicolon to the value, and add the vim directory you installed. For example, on my computer, I installed D:/program files/vim, then add D:/program files/Vim to the end. Open the command line and enter Vim directly!
2. Prepare the GCC compiler. Since I used cfree before, I know that cfree uses the mingw compiler type, that is, standard C. Then I checked that there is a GCC in the bin directory of its installation, g ++, GDB, and other programs are too powerful. Just set the environment variables according to the above method. For example, if my installation directory is still D:/program files/C-free 5, add it to the environment variable. D: /program files/C-free 5/mingw/bin.
3. Use Vim to edit a helloworld program and save hello. C. Compile with GCC, GCC-O hello.exe hello. C. Run: Hello world!
All the work has been completed. There are many tools available in the Directory D:/program files/C-free 5/mingw/bin, such as GDB, very powerful debugging tool, I believe that people who often debug absolutely know. Now you can use vim and GCC in Windows to write C programs as in Linux.
If anything is wrong, correct it.