Browse Source

解决链接问题

daiyueteng 6 years ago
parent
commit
d9a1121d0b
3 changed files with 21 additions and 10 deletions
  1. 6 5
      CMakeLists.txt
  2. 8 4
      module_service/module_const.cpp
  3. 7 1
      module_service/module_const.h

+ 6 - 5
CMakeLists.txt

@@ -12,18 +12,19 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -pthread -m64 -std=c++11 -fPIC -fno-str
 link_directories( "/root/soft/boost_1_67_0/lib" "/usr/lib64/mysql"  "/root/projection/includelib/lib")
 #第三方库头文件目录
 include_directories("/home/user/libev-4.24" "." "/home/user/boost_1_67_0"
-    "/root/projection/includelib/rapidjson"
-    "/root/projection/includelib/websocketpp" "websocketpp/"
+    "/root/projection/includelib/include/"
+    "/root/projection/includelib/include/websocketpp"
     "/usr/include/mysql/"  "src/" "src/internal/"
-    "websocket/" "db_api/")
+    "websocket/" "db_api/" "module_service/")
 
 #输出项目名称
 project(ya-serv)
 #编译项目所需源码
 set(SRC_YASL "ant.cpp" "ant.h" "base64.cpp" "base64.h" "card.cpp" "card.h" "clock.h"
-    "io_buf.h" "line.h" "log.h" "message.cpp" "message.h" "point.cpp"
+    "io_buf.h" "line.h" "message.cpp" "message.h" "point.cpp"
     "point.h" "tdoa_sync.cpp" "tdoa_sync.h" "web-client.cpp" "web-client.h" "worker.cpp" "worker.h" "zio.h"
-    "zloop.h" "znet.cpp" "znet.h" "zstream.h"
+    "zloop.h" "znet.cpp" "znet.h" "zstream.h" "log.h"  "card_path.h" "card_path.cpp"
+    "select_tool.h" "select_tool.cpp" "loc_point.h" "loc_point.cpp" "line_fit.h" "line_fit.cpp"
 
     "net-service.h" "net-service.cpp"
 

+ 8 - 4
module_service/module_const.cpp

@@ -1,9 +1,13 @@
 #include "module_const.h"
 
 
-template<typename T>
-T *singleton_base<T>::_instance = nullptr;
+int global_constant::AREA_SPEED_COUNT_LIMIT=0;
 
-template<typename T>
-std::mutex singleton_base<T>::_mutex_singleton_base;
+
+
+//template<typename T>
+//T *singleton_base<T>::_instance = nullptr;
+
+//template<typename T>
+//std::mutex singleton_base<T>::_mutex_singleton_base;
 

+ 7 - 1
module_service/module_const.h

@@ -619,11 +619,17 @@ private:
     };
     //定义一个静态成员变量,程序结束时,系统会自动调用它的析构函数,我们不需要访问这个变量,所以不需要初始化
     static Garbo garbo;
-
+public:
     static T *_instance;
     static std::mutex _mutex_singleton_base;
 };
 
+template<typename T>
+T *singleton_base<T>::_instance = nullptr;
+
+template<typename T>
+std::mutex singleton_base<T>::_mutex_singleton_base;
+
 
 
 #endif // MODULE_CONST_H