1.��������
��1��PC system��Ubuntu12.04LTS��
��2���༭���汾��Sublime Text 3
2.ʵ��Ŀ��
���������Լ������ʼʹ��Sublime Text 3�༭���룬���ַdz����ã�Ҳ����ǿ��IJ�����������������ǣ��Լ��ڱ༭��C/C++�����ʹ��sublime�Դ���build�������ã����Ǵ����Լ�����һ�����ļ�C/C++�������
3.����C����
��1����sublime�������У�ѡ��“����“->“����ϵͳ“->“�½�����ϵͳ“������ļ�����Ϊ“Untitled.sublime-build“�ļ���������б༭����������Ĵ��룬����Ϊ“myC.sublime-build“��·��ΪĬ��·���Ϳ����ˡ�
{
//"shell_cmd": "make"
"working_dir": "$file_path",
"cmd": "gcc -Wall \"$file_name\" -o \"$file_base_name\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c",
"variants":
[
{
"name": "Run",
"shell_cmd": "gcc -Wall \"$file\" -o \"$file_base_name\" && \"${file_path}/${file_base_name}\""
}
]
}
����������sublime��“����“->“����ϵͳ“->“�½�����ϵͳ“�¿���myC��buildϵͳ��
��2���༭��C���룬���в���
// �ļ����ƣ�test_c_build.c
#include <stdio.h>
int main(int argc, char const *argv[])
{
printf("hello world!\n");
return 0;
}
������ϼ�“Ctrl“+“Shift“+“b“�ͻᵯ����������ѡ��
ѡ��“myC-Run“���룬����ͻ������sublime�·��Ŀ���̨�ϣ����£�

4.����C++����
C++�Ĺ�����Cһ����ֻ���½�����ϵͳʱ���ļ�������Щ��ͬ���ѣ�
{
// "shell_cmd": "make"
"encoding": "utf-8",
"working_dir": "$file_path",
"shell_cmd": "g++ -Wall -std=c++0x \"$file_name\" -o \"$file_base_name\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.cpp",
"variants":
[
{
"name": "Run",
"shell_cmd": "g++ -Wall -std=c++0x \"$file\" -o \"$file_base_name\" && \"${file_path}/${file_base_name}\""
}
]
}
5.myC��myC-Run���������myCֻ���룬��ִ�У���myC-Run�������ֱ��ִ�С�
6.Ŀǰֻ֧�ֱ��뵥�ļ�������ĺ������о��ɡ�
�������ø��µ�ַ��//m.ajphoenix.com/linux/27059.html