摘要:
目录结构----- |--common |---add.h add.cpp |---sub.h sub.cpp |--src |---main.cppCOMMDIR=commonAPPDIR=srcCOMMSRC:=$(wildcard $(COMMDIR)/*.cpp)APPSRC:=$(wildcard $(APPDIR)/*.cpp)COMMDEP:=$(patsubst %.cpp,%.d,$(COMMSRC))APPDEP:=$(patsubst %.cpp,%.d,$(APPSRC))COMMOBJ:=$(patsubst %.cpp,%.o,$(COMMSR... 阅读全文
摘要:
#include #include #include using namespace std;std::once_flag g_flag;void once_func(){ cout << __FUNCTION__ << "\t" << pthread_self() << " this is once call function!" << endl;};void* one_func(void*){ cout << __FUNCTION__ << "\t" 阅读全文
摘要:
自己写的一个Makefile,目录结构为:include ,src ,bin#get the current directoryCUR_DIR=$(shell pwd)#object file ,out file directoryOUT_DIR=$(CUR_DIR)/bin#check if the out dirctory exist, if not create itCHECK_OUT_DIR:=$(shell if [ ! -d $(OUT_DIR) ] ;then mkdir $(OUT_DIR); fi)#the pragram out fileOUT_FILE=test#incl 阅读全文
摘要:
project(name) 设置项目名称project_source_dir 项目所在目录 == ${project_name}_source_dir 工程路径project_binary_dir 生成的二进制文件存放目录 == ${project_name}_source_dir 编译路径set(src_list file...)add_executable(bin_name ${src_list}) add_library(lib_name [shared|static|module|exclude_from_all] ${src_list})add_subdirectory(src .. 阅读全文
摘要:
UML工具apt-cache search dia安装dia, dia-common, dia-libs以下修改,使工具栏和工作窗口分开vim /usr/bin/dia#dia-normal --integrated "$@"dia-normal "$@"画图工具gpaint 阅读全文
摘要:
vim /etc/sysconfig/network/routes添加:default 192.168.1.1重启网络:/etc/init.d/network restart 阅读全文
摘要:
1. 安装kvmapt-get install qemu-kvm2. 安装libvirtapt-get install libvirt-bin3. 安装virt-managerapt-get install virt-manager 阅读全文
摘要:
1. 按v进入visual状态,选择多行,用>或<缩进或缩出2. A命令 .h和cpp文件进行跳转3. Ctrl + o 向前跳转,Ctrl+i向后跳转4. Ctrl + \ ,f 定位在#include的文件上进行文件跳转 Ctrl + \ , s 查找字符5. gd ,局部变量定义的位置6. Ctrl+] 查找定义,Ctrl+t,跳回查找处7 ''回到鼠标上一次停留处, 2个单引号,不是双引号8. " + y,三个组合键将选取的内容复制至剪切板 阅读全文