我已经在本教程的clang帮助下创建了我的自定义插件,
我想在我的Xcode iOS项目上自动运行它.
我需要运行以下附加命令clang,
-Xclang -load \
-Xclang ~/static_analysis/llvm/Debug+Asserts/lib/libPluginExample.so \
-Xclang -plugin -Xclang -example-plugin \
Run Code Online (Sandbox Code Playgroud)
我想保存Xcode生成的所有其他命令,因为很难为每个Xcode项目创建和传递这些命令.这就是我选择使用clang插件而不是clang工具的原因.
我怎么能做到这一点?
或者如何提取xcode生成的编译器标志,以便在clang工具中使用它们?(因为,为了正确使用工具,我需要指定所有包含目录,以及所有源代码和所有框架)
更新:
我在Project中添加了很多命令
设置 - >构建阶段 - >编译源(双击源)
,但在编译时有错误(插件是来自clang源的标准示例libPrintFunctionNames.dylib):
错误:无法加载插件'/Users /...llvm/Debug+Asserts/lib/libPrintFunctionNames.dylib':'dlopen(/ Users /.../ llvm/Debug + Asserts/lib/libPrintFunctionNames.dylib,9) :未找到符号:__ ZN5clang11ASTConsumer21HandleInterestingDeclENS_12DeclGroupRefE引用自:/Users /.../llvm/Debug+Asserts/lib/libPrintFunctionNames.dylib预期在/Users/.../llvm/Debug+Asserts/lib/libPrintFunctionNames中的flat namespace. dylib'命令/应用程序/ Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang失败,退出代码为1
我试图用libPrintFunctionNames.a而不是libPrintFunctionNames.dylib,但它没有帮助.
也许原因是我在llvm和clang的分离源文件上构建了我的插件,而在xcode中我使用了其他版本的clang.我会检查一下.
我刚刚读到有关mode_t的信息,它基本上存储了以下信息:
所以它需要16位= 2个字节.我猜你甚至可以少一点文件类型,因为它必须是常规文件,目录,字符或块设备,套接字,符号链接或管道.或者存在其他文件类型?
所以我刚刚检查了mode_t的大小
printf("Size: %d byte\n", sizeof(mode_t));
Run Code Online (Sandbox Code Playgroud)
它使用4个字节.为什么使用4字节?有没有我没注意到的其他信息?
编辑:我刚刚发现mode_t在ptypes.inc中定义:
type mode_t = cuint32;
Run Code Online (Sandbox Code Playgroud)
cuint32是一个32位大小的无符号整数,在ctypes.inc中定义:
type cuint32 = LongWord;
Run Code Online (Sandbox Code Playgroud)
也许这有助于答案.
我有一个maven spring项目,但是当我尝试运行它时,我无法...关于它的一些想法...
接下来是错误消息:
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4.532s
Finished at: Wed Jul 26 16:04:06 COT 2017
Final Memory: 17M/196M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce
(enforce-versions) on project SIMI: Some Enforcer rules have failed. Look above for
specific messages explaining why the rule failed. -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Run Code Online (Sandbox Code Playgroud)
使用-X开关重新运行Maven以启用完整的调试日志记录。
有关错误和可能的解决方案的更多信息,请阅读以下文章:[帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
我试图用 chrome、java 和 selenium 做一些自动化项目,但在导入 chrome 驱动程序时遇到问题。
package main;
import org.openqa.selenium.*;
public class SitePoster {
public static void main(String[] args) {
//System.setProperty("webdriver.chrome.driver", "./pathtodriver");
WebDriver driver = new ChromeDriver();
//Getting error saying "ChromeDriver can't be resolved to a type"
}
}
Run Code Online (Sandbox Code Playgroud) 我有一个带有数量和价格输入的动态表,我使用计算属性来计算每一行的总数.现在我需要找到一种方法来计算grandtotal(所有小计的总和).
HTML:
<tr v-for="(item, index) in items">
<td><input v-model.number="item.qty" size="10"></td>
<td><input v-model.number="item.price" size="10"></td>
<td><input v-model.number="subtotalRow[index]" readonly size="10"></td>
<td><button @click="addRow(index)">+</button></td>
<td><button @click="removeRow(index)">-</button></td>
</tr>
<tr>
<td>Total: {{total}}</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
使用Javascript:
computed: {
subtotalRow() {
return this.items.map((item) => {
return Number(item.qty * item.price)
});
},
// the index part is confusing me
//
// total() {
// return this.items.reduce((total, ?) => {
// return total + ?;
// }, 0);
//}
},
Run Code Online (Sandbox Code Playgroud)
我提供了一个小小的小提琴来清楚地说明问题.
https://jsfiddle.net/h5swdfv5/
我希望一些指导可以帮助我.先感谢您
由于某种原因,此文件中定义的符号之一未显示在目标文件中:
/**
* || File: random.cc
* || Project: Shatter
* || Encoding: UTF-8
* || Author: ********
*
* Copyright (C) 2016 ********** *. ****
* All rights reserved.
* Use by explicit written permission only.
*
* Changelog:
* - Aug 24, 2016, 07:35:22 PM --- File was created by ********
*
*/
#include <shatter/random/random.h>
// @TODO: MOVE TO <config-build.h>
#define _M_FEATURE_ARC4RANDOM
#ifdef _M_FEATURE_ARC4RANDOM
#define RAND_SEED (arc4random())
#define RAND_IMPL (rand())
#else
#include <time.h>
#define RAND_SEED (time(NULL))
#define RAND_IMPL …Run Code Online (Sandbox Code Playgroud) c ×2
java ×2
c++ ×1
clang ×1
eclipse ×1
filesystems ×1
ios ×1
linux-kernel ×1
maven ×1
minix ×1
netbeans ×1
object-files ×1
permissions ×1
plugins ×1
selenium ×1
spring ×1
templates ×1
vuejs2 ×1
xcode ×1