C++报错Undefined symbols for architecture x86_64
发表于|更新于
|总字数:111|阅读时长:1分钟|浏览量:
Undefined symbols
在开发NDK 使用C++ 编写代码时,使用AES 加密时,在Xcode 提示Undefined symbols
因为在使用的地方使用的是C++ ,面AES您可能使用的是C语言.
你可以创建一个.hpp文件
添加如下
1 | #ifndef _AES_HPP_ |
C++ 与C语言有语法上的不同.
文章作者: NUK
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 凌羽!
相关推荐
2019-07-01
JNI 检查应用签名
开发NDK时,为保存你的so文件不被拿去反调试,可以添加应用签名校验 (adsbygoogle = window.adsbygoogle || []).push({}); checksign.hpp 1234567891011121314151617#ifndef checksign_hpp#define checksign_hpp#include <stdio.h>#include <jni.h>static const char *app_packageName = "com.uilucky.demo";static const int app_signature_hash_code = 1985487779;static const char *RELEASE_SIGN = "78454545454545454545555555555555555555555555555555555...";jobject getApplication(JNIEnv *env);/* 校验APP签名是...
2019-06-26
Xcode开发JNI NDK
平时在开发中,或多或少都会用到JNI方面的技术,比如我们项目中,消息的加密和解密就是通过C来实现的,然后打包为.so动态库,并提供Java接口供应用层调用,这么做的目的主要就是为了提供应用的安全性,防止被反编译后被分析加密的逻辑。接下来就要介绍JNI和NDK的区别,怎样创建一个项目开发JNI。 (adsbygoogle = window.adsbygoogle || []).push({}); JNI与NDK JNI Java Native Interface,即Java本地接口,使用JNI可以使得Java与本地其他类型语言(如C、C++)交互。JNI是 Java调用Native语言的一种特性,JNI是属于Java的,与 Android无直接关系。 NDK Native Development Kit,是Android的一个工具开发包。NDK是属于Android的,与Java并无直接关系,只是通过NDK可以快速方便的使用JNI,开发C、C++动态库。 ##开发JNI 开发JNI,一般都有两种途径: Java项目直接引用生成好的动态库,动态库...
2020-04-08
adb获取Android手机系统版本
adb获取Android手机系统版本 (adsbygoogle = window.adsbygoogle || []).push({}); 获取系统版本: adb shell getprop ro.build.version.release 7.1.2 获取系统api版本: adb shell getprop ro.build.version.sdk 25 获取手机相关制造商信息: adb shell getprop | grep “model|version.sdk|manufacture r|hardware|platform|revision|serialno|product.name|brand”
2020-04-14
Appium 自动化测试
Appium自动化测试 (adsbygoogle = window.adsbygoogle || []).push({}); 一 基础环境安装1.安装 Homebrew 1/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2.安装 libimobiledevice brew install libimobiledevice 3.安装 ideviceinstaller(真机安装相关) 1brew install ideviceinstaller 4.安装 carthage 1brew install carthage 安装 carthage容易出现以下错误 1234Error: An unexpected error occurred during the `brew link` stepThe formula built, but is not symlinked into /usr/...
2020-04-01
Android TV 自动化测试
Android 自动化测试 脚本运行 (adsbygoogle = window.adsbygoogle || []).push({}); Android 自动化测试 脚本运行ADB基本使用方法连接 adb connect 192.168.0.100 进入设备的shell adb -s 192.168.0.100 shell 退出adb exit 断开连接 adb disconnect 抓取log adb -s 192.168.0.100 logcat> /Users/kun/Desktop/adb_log/db/有线电视/1.txt 自动化脚本首先要了解手机(TV)的众多输入设备命令: 1adb shell cat /proc/bus/input/devices 输出 12345678910111213141516171819202122232425262728293031I: Bus=0010 Vendor=0001 Product=0001 Version=0100N: Name="aml_keypad"P: ...
2020-04-12
adb获取Android apk 性能信息
获取性能信息 (adsbygoogle = window.adsbygoogle || []).push({}); 如果adb 连接多个设备,需要添加 -s 如果只连接一个设备 -s 192.168.0.101 可以忽略 12-s 192.168.0.101 一、安装和卸载 adb -s 192.168.0.101 install <apk路径> adb -s 192.168.0.101 uninstall <应用包名> 二、log相关 adb logcat : 抓取所有log,无任何过滤 adb logcat -c : 清除手机之前的log信息 adb logcat -s : 抓取指定 tag 的log信息,这里的tag是任何自己定义的字符 adb logcat > “C:\Users\Administrator\Desktop\log.txt” : 保存log到本机指定路径,这里路径需要自定义 adb -s 192.168.0.102 logcat >/Users/kun/Desktop/db...


