From acec36334bb1fa0990f0d85180a84ecc3ed2c71e Mon Sep 17 00:00:00 2001
From: lizhanwei <Dana_Lee1016@126.com>
Date: 星期三, 08 一月 2020 14:38:19 +0800
Subject: [PATCH] 提交c++

---
 lib/src/main/cpp/test_items/park_bottom.cpp |    1 +
 lib/src/main/cpp/test_items/turn_a90.cpp    |    1 +
 lib/src/main/cpp/test_items/park_edge.cpp   |    1 +
 lib/src/main/cpp/native-lib.cpp             |    1 +
 lib/build.gradle                            |    2 +-
 5 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/build.gradle b/lib/build.gradle
index cdc5d5b..af41cde 100644
--- a/lib/build.gradle
+++ b/lib/build.gradle
@@ -14,7 +14,7 @@
 
         externalNativeBuild {
             cmake {
-                cppFlags ""
+                cppFlags "-std=c++11 -frtti -fexceptions"
             }
         }
         ndk {
diff --git a/lib/src/main/cpp/native-lib.cpp b/lib/src/main/cpp/native-lib.cpp
index fad1480..95d71a5 100644
--- a/lib/src/main/cpp/native-lib.cpp
+++ b/lib/src/main/cpp/native-lib.cpp
@@ -2,6 +2,7 @@
 #include <string>
 #include <pthread.h>
 #include <unistd.h>
+#include <cstdlib>
 #include "common/serial_port.h"
 #include "jni_log.h"
 #include "common/net.h"
diff --git a/lib/src/main/cpp/test_items/park_bottom.cpp b/lib/src/main/cpp/test_items/park_bottom.cpp
index d7f1422..cc566e8 100644
--- a/lib/src/main/cpp/test_items/park_bottom.cpp
+++ b/lib/src/main/cpp/test_items/park_bottom.cpp
@@ -9,6 +9,7 @@
 #include "../jni_log.h"
 #include "../driver_test.h"
 #include <vector>
+#include <cstdlib>
 
 using namespace std;
 
diff --git a/lib/src/main/cpp/test_items/park_edge.cpp b/lib/src/main/cpp/test_items/park_edge.cpp
index 205013e..6b1d625 100644
--- a/lib/src/main/cpp/test_items/park_edge.cpp
+++ b/lib/src/main/cpp/test_items/park_edge.cpp
@@ -9,6 +9,7 @@
 #include "../native-lib.h"
 
 #include <vector>
+#include <cstdlib>
 
 using namespace std;
 
diff --git a/lib/src/main/cpp/test_items/turn_a90.cpp b/lib/src/main/cpp/test_items/turn_a90.cpp
index 5c17947..477bcbc 100644
--- a/lib/src/main/cpp/test_items/turn_a90.cpp
+++ b/lib/src/main/cpp/test_items/turn_a90.cpp
@@ -9,6 +9,7 @@
 #include "../jni_log.h"
 
 #include <vector>
+#include <cstdlib>
 
 using namespace std;
 

--
Gitblit v1.8.0