- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
下面是我的build.gradle。构建失败,原因是函数“管道”的隐式声明在C99中无效[-Wimplicit-function-declaration]
如果(-1 == pipe(ctx-> control_pipe)){
^
应用插件:“com.android.model.application”
model {
android {
compileSdkVersion = 21
buildToolsVersion = "21.1.2"
defaultConfig.with {
applicationId = "org.shadowvpn.shadowvpn"
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 21
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
isMinifyEnabled = false
proguardFiles += file('proguard-rules.pro')
}
}
android.ndk {
moduleName = "ShadowVPN-jni"
toolchain = "clang"
toolchainVersion = "3.6"
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/hmacsha256/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/hmacsha512/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/hmacsha512256/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_box/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/hsalsa20/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/salsa20/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/salsa20/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/salsa2012/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/salsa2012/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/salsa208/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_core/salsa208/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_generichash/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_generichash/blake2/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_generichash/blake2/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_hash/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_hash/sha256/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_hash/sha256/cp/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_hash/sha512/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_hash/sha512/cp/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_onetimeauth/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_onetimeauth/poly1305/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_pwhash/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_scalarmult/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_scalarmult/curve25519/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_secretbox/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_shorthash/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_shorthash/siphash24/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_sign/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_sign/ed25519/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_sign/ed25519/ref10/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/aes128ctr/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/chacha20/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/chacha20/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/salsa20/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_stream/salsa20/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/16/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/16/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/32/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/32/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/64/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/crypto_verify/64/ref/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/include/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/include/sodium/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/randombytes/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/randombytes/salsa20/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/randombytes/sysrandom/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/libsodium/src/libsodium/sodium/")}".toString()
CFlags += "-I${file("src/main/jni/ShadowVPN/src")}".toString()
ldLibs += "log"
stl = "system"
}
}
compiling vpn.c successful.
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/vpn.c:35:13: warning: implicit declaration of function 'pipe' is invalid in C99 [-Wimplicit-function-declaration]
if (-1 == pipe(ctx->control_pipe)) {
^
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/vpn.c:47:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration]
close(ctx->tun);
^
2 warnings generated.
compiling version.c failed.
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/src/libsodium/sodium/version.c:2:10: fatal error: 'version.h' file not found
#include "version.h"
^
1 error generated.
compiling aead_chacha20poly1305.c failed.
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/aead_chacha20poly1305.c:3:
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/cmptest.h:11:
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/src/libsodium/include/sodium.h:48:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
^
1 error generated.
compiling auth.c failed.
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/auth.c:3:
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/cmptest.h:11:
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/src/libsodium/include/sodium.h:48:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
^
1 error generated.
compiling auth2.c failed.
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/auth2.c:4:
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/cmptest.h:11:
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/src/libsodium/include/sodium.h:48:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
^
1 error generated.
compiling utils.c successful.
compiling auth7.c failed.
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/auth7.c:3:
In file included from /Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/test/default/cmptest.h:11:
/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/src/libsodium/include/sodium.h:48:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
^
1 error generated.
最佳答案
您的构建不会因为pipe
函数而失败,这是一个警告。由于编译器找不到version.h
文件,因此构建失败。我猜想您缺少这些(许多)-I
标志之一,尤其是该文件夹:/Users/shawn/Developer/github/ShadowVPNAndroid/mobile/src/main/jni/ShadowVPN/libsodium/src/libsodium/sodium/
关于android - android gradle plugin 1.4 beta ndk clang,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31678170/
我知道的引用资料在这里: http://clang.llvm.org/docs/ClangCommandLineReference.html http://clang.llvm.org/docs/Di
这两个工具似乎有一些共同的目标,而 documentation of clang-tidy对其功能非常明确,clang-check's有点稀疏。 如果我只能运行这些工具中的一个,同时进行相同的检查,那
我不清楚 clang 使用的汇编器。 AFAIK native 又名 GNU 汇编器和链接器被使用(与 gcc 一起提供)。 clang -v main.c clang version 3.4.2 T
在哪里可以找到 Clang 标志的完整列表? 还有一些,例如 -include-pch,甚至没有在手册页中列出。 :( 我知道 GCC 使用一些相同的标志,但它不包含诸如 -Os 之类的文档,我相信这
大多数成熟的编译器似乎对堆栈变量破坏有很好的支持。 海湾合作委员会:-fstack-protector xlC: -qstackprotect 英特尔:-fstackprotector window
我的命令: /usr/bin/c++ -fPIC -I/Users/me/project/include -I/usr/local/include/opencv \ -I/usr/local/incl
我正在研究 CLang 3.5。我正在尝试获取有关在 C++ 项目中声明的变量的信息。 如何获取 clang::VarDecl 中变量的数据类型或限定类名, clang::FieldDecl或 cla
我正在尝试构建 LLVM 编译器,以便我可以在 Apple M1 上启用 OpenMP。 我正在使用 LLVM 开发树,(因为我最近看到一些 OpenMP 运行时对此进行了处理)。 我已经结束了这个脚
背景: 在 Windows 10 PC 上,我有一个 C++ 代码库。使用 CMAKE 我生成了一个 Mingw-w64 项目(使用 Eclipse IDE)和一个 Visual Studio 201
下面是我想做的。 我想通过使用 cmake 的正确程序检测 clang 来使用 clang/clang++ 进行编译。 请告诉我可以解决我将描述的问题的正确程序。 test environment:
基本问题 我有以下代码 #include #include using namespace std; int main () { int32_t spam; spam=5; cout
当我在xcode中编译.c文件时,出现错误提示: clang error: argument unused during compilation: '-fno-objc-exceptions' [-W
Clang has several kinds of diagnostics ,其中三种主要是错误、警告和注释。 注释通常伴随着某些警告和错误,例如重复定义: error: conflicting t
我正在调整 Clang 工具模板(如 here 所述)以在我的代码中搜索特定的方法调用。为了稍后重写该调用,我想获取调用该方法的参数的类型,以及调用该方法的对象的类型。 我设法找到了一个可以回调以下内
我必须通过在它之前添加一个语句来检测 clang 中的某些语句。我有一个指向 Expr 对象的指针,我需要在包含它的语句之前插入另一个语句。现在我正在使用一种hacky方法,它只是将 SourceLo
类 clang::ASTContext 有一个方法: DynTypedNodeList getParents(const NodeT &Node) 它返回给定 AST 节点的父节点列表。 通常 AST
我想修改代码分析器程序clang-tidy的检查正在做,但是好像是配置文件.clang-tidy的内容正在被忽视。 我通过调用 clang-tidy 创建文件带旗-dump-config并将输出重定向
有没有办法用clang创建一个可以合理地适合页面的调用图? 即给出: #include using namespace std; int main() { int a; cin>>a;
我正在编写一个 Clang 工具,并且试图弄清楚如何在访问程序 AST 的情况下评估字符串文字。给定以下程序: class DHolder { public: DHolder(std::strin
我想在 Clang 中尝试一些新功能,有人提到我 Clang TOT . 现在这可能是一个明显的问题,到底是什么Clang TOT . TOT 一定是一些我不熟悉的首字母缩写词。 任何人都可以启发我吗
我是一名优秀的程序员,十分优秀!