草庐IT

format-specifiers

全部标签

android - 使用 ARM 的 newlib 交叉编译 GCC : how to specify GCC options like -march?

我已经在MacOSX上为ARM目标编译了GCC和newlib。但是,libc.a是使用-fshort-enums编译的,我不希望这样,因为当我为ARM编译东西时,我使用-fno-short-enums。当然,这会发生冲突:ld:warning:/var/folders/9m/2wnjp9zd71x13cpdpf16y_4r0000gn/T//ccQuEnp6.ouses32-bitenumsyettheoutputistousevariable-sizeenums;useofenumvaluesacrossobjectsmayfail每次我尝试运行“Hello,World!”时可执行文

Android Fragment(与 2.3.3 上的兼容包)创建 "Specified child already has a parent error"

我正在使用兼容性包在我的Android应用程序中使用fragment。我已经在运行2.3.3和GoogleAPI2.2模拟器的NexusOne上测试了该应用程序。通过布局XML添加fragment时效果很好(使用fragment标签)。将fragment动态添加到FrameLayout时,它没有成功将fragment添加到容器中,并引发以下错误。alStateException:Thespecifiedchildalreadyhasaparent.YoumustcallremoveView()onthechild'sparentfirst完整的堆栈跟踪如下。05-1719:44:03.

安卓工作室 : You must specify a path to Genymotion folder to use this feature

我已经通过AndroidStudio中的插件向导下载并安装了Genymotion模拟器插件。我在Windows机器上运行AndroidStudio。我收到一条警告说我必须提供Genymotion文件夹的路径:这个文件夹在哪里?我似乎在我的AndroidStudio安装文件夹中找不到它。 最佳答案 对于windows,默认路径是C:\ProgramFiles\Genymobile\Genymotion在Mac上,您可以在此处找到它:/Applications/Genymotion.app您必须在AndroidStudio设置中的Gen

android - 使用 RecyclerView 时出错 : The specified child already has a parent

我正在尝试使用新的RecyvlerView适配器创建listView。我遵循了android开发人员资源上的确切指南。但这给了我一个奇怪的错误:指定的child已经有一个parent。您必须先在child的parent上调用removeView()。我有最新的SDK。我还在gradle中定义了依赖项。我的Activity(主要Activity):publicclassMyActivityextendsActivity{privateRecyclerViewmRecyclerView;privateRecyclerView.AdaptermAdapter;privateRecyclerV

android - 警告 : No target specified, 部署到模拟器

我正在尝试在我的手机(Android4.4.2)上运行ionic应用程序。USB调试已激活。当我运行命令"ionicemulateandroid"一切正常,应用程序在模拟器中打开。但是当我运行commad"ionicrunandroid"我收到以下警告:警告:未指定目标,正在部署到模拟器应用程序在虚拟设备上启动...应用程序不应该在我的手机上运行吗?我究竟做错了什么?如何指定目标?P.S.:当我将.apk文件复制到手机时,我可以运行该应用程序。 最佳答案 我打开了另一个开发工具(ChromeInspect),它“吃掉”了连接。就我而

vscode安装配置clang-format插件及使用

vscode安装配置clang-format插件及使用首先安装插件。在vscode扩展里搜索clang-format,安装排名第一的xaver.clang-format。确认clang-format可执行程序路径windows用eveything查找一下clang-format.exe,最新的扩展c/c++里集成了clang-format。如:C:\Users\jack\.vscode\extensions\ms-vscode.cpptools-1.13.9-win32-x64\LLVM\bin\clang-format.exe。Linux用命令whichclang-format查询clang

c++ - 在 clion 中编译时出现错误 "executable is not specified"

我正在使用MacOS并尝试在Clion中编写c++代码,但是当我运行简单的helloworld代码时,我收到错误executableisnotspecified。我是Clion的新手。Cmakelist.txtcmake_minimum_required(VERSION3.2)project(untitled)set(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS}-std=c++11")set(SOURCE_FILESmain.cpp)add_executable(untitled${SOURCE_FILES}) 最佳答案

c++ - 我如何使用 clang-format 缩进 C++ pragma?

我正在使用vim-autoformat,它使用clang-format作为外部格式化程序。clang-format似乎不会缩进C++#pragma。例如:#include#includeintmain(){#pragmaompparallelforfor(inti=0;i我想把它格式化成:#include#includeintmain(){#pragmaompparallelforfor(inti=0;i我检查了clangformat,但没有找到我可以使用的选项。 最佳答案 已经很晚了,但这是您正在寻找的解决方案。它将编译指示与代码

c++ - 为什么不能在声明中包含多个 decl-specifier-seq?

以下是无效代码:inti=0,doublej=2.0;标准草案说明了原因:[N4140/7.1.6]2Asageneralrule,atmostonetype-specifierisallowedinthecompletedecl-specifier-seqofadeclarationorinatype-specifier-seqortrailing-type-specifier-seq.Theonlyexceptionstothisrulearethefollowing:—constcanbecombinedwithanytypespecifierexceptitself.—vola

c++ - clang-format 打破 lint 注释

我们在C/C++的代码库中使用lint,我也在尝试将clang-format集成到我的工作流程中。不幸的是,lint有时需要注释来忽略特定检查,格式如下:/*lint-[annotation]*/或//lint-[annotation]具体来说,如果注释的开始标记和“lint”之间有空格,它不会将其识别为注释指令。不幸的是,我对clang-format的默认设置将其视为错误并有助于插入空格。有没有什么方法可以让clang-format识别与该模式匹配的评论并让它们不理会?目前我使用的是3.4,但如果需要可以升级。 最佳答案 Clan