It is estimated that many people are accustomed to the Visual Studio of the Lord, how do not adapt to the Linux set of editors, such as vim, source Insight, the visual eclipse effect is better, but generally to remotely share a Linux server mainly, Not so good condition one person a Linux machine.
I used a few months of insight, but also look at the code, anyway, personal feeling is awkward, now change with vs edit Code, feel much more cool.
The approximate method is as follows:
(1) Download the Linux code from SVN to the local directory.
(2) Open Visual Studio, select "File", "New", "Project from Existing Code" to create the project from the existing code.
(3) Select the directory of the Linux code and create a new project, such as the name Server_vs.
This time can be very convenient to see the code, but the lack of Linux system header files
(4) Download all files from the/usr/include directory on the Linux system to the local code directory, such as create a new subfolder include_linux.
Set the VS header file containing directories
(5) Right-click on the project name Server_vs, select "Properties", "C + +", "Additional Include Directories" To add a new item. \include_linux.
(6) Follow step 5, as long as the code in the go To definition, the definition of the header file can not be found, the need to include the directory added to ensure that any type will find the header file.
(7) Select the Text Editor for tools, options, VS, and select Auto-detect UTF-8 Encoding without signature to automatically detect UTF-8 encoding without signatures (D). Because Windows and Linux are not line-breaks, Windows uses \ r \ n To line up, and Linux uses \ n to wrap.
At this point you can use the powerful features of VS to edit code, such as automatically prompt what (to install VC assistant), very cool AH.