libc++

Tesseract-OCR 3.02 with libc++

纵饮孤独 提交于 2019-12-03 00:47:51
Xcode 4.6, iOS SDK 6.1, tesseract-ocr 3.02 Since the last OpenCV versions are built using libc++ , and tesseract-ocr is built using libstdc++ , they can't be used together in one xcode project. So, I'm trying to build tesseract using libc++. Using the script here (updating the base sdk and deploy target to 6.1), tesseract is being built just fine, and works in my xcode project once the C++ standard library is set to the compiler default. Than, I tried altering the script to build it with libc++, according to the answer here . I changed CXX to point to clang++ , and added -stdlib=libc++ to the

Install libc++ on ubuntu

夙愿已清 提交于 2019-12-02 19:15:19
I am wondering what is the right/easy way to install a binary libc++ on Ubuntu, in my case Trusty aka 14.04? On the LLVM web site there are apt packages http://apt.llvm.org/ and I have used these to install 3.9. However these packages don't seem to include libc++. I install the libc++-dev package but that seems to be a really old version. There are also binaries that can be downloaded http://llvm.org/releases/download.html#3.9.0 . These do seem to contain libc++ but I'm not sure if I can just copy bits of this into places like /usr/include/c++/v1, in fact I'm not really sure what bits I would

undefined reference to `__dynamic_cast' using libc++ on ubuntu

孤街浪徒 提交于 2019-12-02 16:55:28
问题 I'm trying to compile a test case that employs dynamic_cast using libc++, which was compiled according to "Build on Linux using CMake and libsupc++". #include <iostream> struct A { virtual void f(){ std::cout << "Virtual A" << std::endl; } virtual ~A(){} }; struct B : public A { void f() { std::cout << "Virtual B" << std::endl; } virtual ~B(){} }; int main() { A *a = new B; B *b = dynamic_cast<B *>(a); delete a; } I'm on ubuntu 13.04 and compiling with clang++ -std=c++11 -stdlib=libc++ . Why

undefined reference to `__dynamic_cast' using libc++ on ubuntu

天大地大妈咪最大 提交于 2019-12-02 12:47:21
I'm trying to compile a test case that employs dynamic_cast using libc++, which was compiled according to "Build on Linux using CMake and libsupc++" . #include <iostream> struct A { virtual void f(){ std::cout << "Virtual A" << std::endl; } virtual ~A(){} }; struct B : public A { void f() { std::cout << "Virtual B" << std::endl; } virtual ~B(){} }; int main() { A *a = new B; B *b = dynamic_cast<B *>(a); delete a; } I'm on ubuntu 13.04 and compiling with clang++ -std=c++11 -stdlib=libc++ . Why I'm getting undefined reference to '__dynamic_cast' ? How to solve it? EDIT Looks like it has

User Leak, libc++ leak or false positive

无人久伴 提交于 2019-12-02 04:20:34
问题 I am building a dynamic library on mac in C++11 using the clang compiler and libc++ standard library. When I run valgrind on my test code which links to my dynamic library I get one block of memory that is definitely lost. Here is the valgrind report: ==45659== 36 bytes in 1 blocks are definitely lost in loss record 57 of 228 ==45659== at 0x66BB: malloc (vg_replace_malloc.c:300) ==45659== by 0x31EAB0: __Balloc_D2A (in /usr/lib/system/libsystem_c.dylib) ==45659== by 0x31F2A5: __d2b_D2A (in

Mixing stdc++ and libc++ in an iOS project

落花浮王杯 提交于 2019-12-01 19:12:42
I am having a difficult time configuring an iOS project which uses a static library linked against the old libstdc++ that gcc used. That library is 32 and 64-bit. There are 6 libraries (libssl.a for example) that are 32-bit and must be updated. If I compile those libraries from source, they will be automatically linked with libc++, which will result in my linker complaining. Therefore, here are my questions: 1) Is there any way to have a single static library inside the project use libstdc++, and have the others use libc++? 2) How can I compile libraries from source (like libcrypto and libssh)

Does the standard mandate enable_shared_from_this is to be inherited publicly? Why?

半城伤御伤魂 提交于 2019-12-01 17:46:31
It's common to inherit from enable_shared_from_this just to be able to return shared_ptr 's from member functions as the primary intention, with no intention of exposing enable_shared_from_this API in the derived class. Since to make use of enable_shared_from_this one must do so through public inheritance (does the standard mandates this? what's the rationale?), this can't be achieved and enable_shared_from_this API is forced into derived class public API. Inherenting enable_shared_from_this privately and making shared_ptr a friend class do work on clang coupled with libc++, but doesn't work

How to detect -stdlib=libc++ in the preprocessor?

白昼怎懂夜的黑 提交于 2019-12-01 15:22:20
I think this is part of the problem at No type named 'unique_ptr' in namespace 'std' when compiling under LLVM/Clang . According to Marshall Clow , I can detect -stdlib=libc++ via _LIBCPP_VERSION : If you're writing cross-platform code, sometimes you need to know what standard library you are using. In theory, they should all offer equivalent functionality, but that's just theory. Sometimes you just need to know. The best way to check for libc++ is to look for the preprocessor symbol _LIBCPP_VERSION. If that's defined, then you're using libc++. #ifdef _LIBCPP_VERSION // libc++ specific code

How to detect -stdlib=libc++ in the preprocessor?

断了今生、忘了曾经 提交于 2019-12-01 14:15:15
问题 I think this is part of the problem at No type named 'unique_ptr' in namespace 'std' when compiling under LLVM/Clang. According to Marshall Clow, I can detect -stdlib=libc++ via _LIBCPP_VERSION : If you're writing cross-platform code, sometimes you need to know what standard library you are using. In theory, they should all offer equivalent functionality, but that's just theory. Sometimes you just need to know. The best way to check for libc++ is to look for the preprocessor symbol _LIBCPP

iOS 仿看了吗应用、指南针测网速等常用工具、自定义弹出视图框架、图片裁剪、内容扩展等源码

折月煮酒 提交于 2019-12-01 04:43:01
iOS精选源码 扩展内容的cell - folding-cell 一个近乎完整的可识别中国身份证信息的Demo 可自动快速... JPImageresizerView 仿微信的图片裁剪 带年月和至今以及设置分钟间隔的时间选择器(picker) 好用的弹窗组件 一个轻量级的自定义视图弹出框架,可灵活配置动画、背... iOS仿看了吗 日常工具(指南针,量角器,刻度尺,测网速,测噪音等) iOS优质博客 深入浅出 iOS 并发编程 什么是并发编程在大多数场景下,我们所写的代码是逐行顺序执行——在固定的时段内,程序只执行一个任务。而所谓并发编程,就是指在固定的时段内,程序执行多个任务。举个例子,当我们在微博 App 的首页滑动浏览时,微博也在从网络端预加载新的内容或者图片。并发编程可以充分利用硬件性能,合理分配软件资源... 阅读原文 iOS 验证码输入一种实现思路 如图所示,现在很多App采用了类似下划线、方块等方式的验证码输入,直观美观!对于这种效果的实现方式,大概有以下几种方式:1.多个UITextField组成这种方式好处是有光标闪烁、但是在处理删除和动画效果时,就会显得有点笨拙,OFO应该是这样实现的,要严格处理好每个UITextField的FirstResponder。... 阅读原文 APP无埋点技术调研 代码埋点:通过手写代码的方式进行埋点。代码埋点存在高度耦合、依赖发版