1
0

2 Коммитууд 34fe0312d1 ... 3eb8970d35

Эзэн SHA1 Мессеж Огноо
  yaozheng0922 3eb8970d35 makefile文件 4 сар өмнө
  yaozheng0922 8e0e0ceacf main函数 4 сар өмнө
2 өөрчлөгдсөн 23 нэмэгдсэн , 0 устгасан
  1. 11 0
      source/main.cc
  2. 12 0
      source/makefile

+ 11 - 0
source/main.cc

@@ -0,0 +1,11 @@
+#include "server.hpp"
+
+#define HOST "127.0.0.1"
+#define USER "thj"
+#define PASSWD "Abcd1234@"
+
+int main() 
+{
+    gobang_server server(HOST, USER, PASSWD);
+    server.start(8081);
+}

+ 12 - 0
source/makefile

@@ -0,0 +1,12 @@
+.PHONY:all
+all:gobang #test
+
+test:test.cc logger.hpp util.hpp db.hpp online.hpp room.hpp session.hpp matcher.hpp
+	g++ -o $@ $^ -std=c++11 -lmysqlclient  -L/usr/lib64/mysql/ -ljsoncpp -lpthread -lboost_system
+
+gobang:main.cc server.hpp
+	g++ -o $@ $^ -g -std=c++11 -lmysqlclient  -L/usr/lib64/mysql/ -ljsoncpp -lpthread -lboost_system
+
+.PHONY:clean
+clean:
+	rm -f gobang