输入下面命令配置git工具:
git config --global core.quotepath false | O_DIR := build | |
| CREATE_O_DIR := $(shell mkdir -p $(O_DIR)) | |
| BIN := $(O_DIR)/main | |
| SRCS := $(wildcard *.cpp) | |
| temp_OBJS := $(addsuffix .o,$(basename $(SRCS))) | |
| OBJS := $(temp_OBJS:%=$(O_DIR)/%) | |
| temp_DEPENDS := $(addsuffix .d,$(basename $(SRCS))) |
| O_DIR := build | |
| CREATE_O_DIR := $(shell mkdir -p $(O_DIR)) | |
| BIN := $(O_DIR)/main | |
| SRCS := $(wildcard *.cpp) | |
| temp_OBJS := $(addsuffix .o,$(basename $(SRCS))) | |
| OBJS := $(temp_OBJS:%=$(O_DIR)/%) | |
| temp_DEPENDS := $(addsuffix .d,$(basename $(SRCS))) |
| O_DIR := build | |
| CREATE_O_DIR := $(shell mkdir -p $(O_DIR)) | |
| BIN := $(O_DIR)/main | |
| SRCS := $(wildcard *.cpp) | |
| temp_OBJS := $(addsuffix .o,$(basename $(SRCS))) | |
| OBJS := $(temp_OBJS:%=$(O_DIR)/%) | |
| temp_DEPENDS := $(addsuffix .d,$(basename $(SRCS))) |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <fcntl.h> | |
| #include <strings.h> | |
| #include <errno.h> | |
| #include <sys/socket.h> | |
| #include <resolv.h> | |
| #include <netdb.h> | |
| #include <netinet/in.h> | |
| #include <netinet/ip_icmp.h> |
| #include <QCoreApplication> | |
| #include <QtCore> | |
| #include "qsettings_json.hpp" | |
| int main(int argc, char *argv[]) | |
| { | |
| QSettings setting("config.json", JsonFormat); | |
| qDebug().noquote() << setting.value("data").toInt(); |
| MACRO(auto_add_subdir cur_dir) | |
| #ignore idea project configure dir | |
| file(GLOB children RELATIVE ${cur_dir} [^.]*) | |
| #set(dirlist "") | |
| foreach(child ${children}) | |
| #sure it is dir and has cmakelist.txt file | |
| if(IS_DIRECTORY ${cur_dir}/${child} AND EXISTS ${cur_dir}/${child}/CMakeLists.txt) | |
| #list(APPEND dirlist ${child}) | |
| add_subdirectory(${child}) | |
| endif() |
在windows操作系统搭建一个简单的Linux开发环境,不用开虚拟机。
工具下载地址:https://www.cygwin.com/
根据具体情况下载64位还是32位。
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include "hashmap.h" | |
| int main(void) | |
| { | |
| int val[5] = {0, 1, 2, 3, 4}; | |
| hashmap* map = HashmapInit(5); |
| /** | |
| * @file fsm.c | |
| * @brief an implementation for a FSM in C, this file contains | |
| * implementation of definations. | |
| * License GPLv3+ | |
| * @author Ankur Shrivastava | |
| */ | |
| #include "fsm.h" | |
| #include<stdlib.h> |