在Mac OS X 10.9(Mavericks)上使用macports安装opencv(install opencv using macports on Mac OS X 10.9 (Mavericks))
这是我在stackoverflow中的第一个问题。 我想要具体。
我试图在我的Mac上安装opencv,我发现在Mac OS X 10.9(Mavericks)上安装openCV 2.4.2 。 根据答案,我在安装macports后尝试了“sudo port install opencv”。
但是我收到以下消息: 错误:无法打开端口:无法设置“compiler.blacklist”:无法确定编译器“llvm-gcc-4.2”的内部版本号
我认为它与gcc和clang有关,但我不确定它是如何工作的。 我安装了Xcode5以及命令行工具。
simicah:〜$ gcc --version
配置为: - prefix = / Applications / Xcode.app / Contents / Developer / usr --with-gxx-include-dir = / usr / include / c ++ / 4.2.1 Apple LLVM 5.0(clang-500.2.79) (基于LLVM 3.3svn)目标:x86_64-apple-darwin13.0.0线程模型:posix
你能帮我解决这个问题并解释我遇到错误的原因吗? 谢谢。
This is my first question in stackoverflow. I am trying to be specific.
I was trying to install opencv on my mac and I found Installing openCV 2.4.2 on Mac OS X 10.9 (Mavericks). According to the answer, I tried "sudo port install opencv" after installing macports.
But I got the following message: Error: Unable to open port: can't set "compiler.blacklist": couldn't determine build number of compiler "llvm-gcc-4.2"
I think it has something to do with gcc and clang, but I'm not sure how it works. I installed Xcode5 as well as the command line tool.
simicah:~$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix
Could you help me fix this and explain why I encountered that error? Thanks.
原文:https://stackoverflow.com/questions/21804384
相关问答
更多-
boost目录迭代器(boost directory iterator)[2021-07-29]
path不是一个字段,它是一个方法,所以你应该像这样调用它: cout << iter-> path(); path is not a field, it is a method, so you should call it like that: cout << iter->path(); -
Boost :: Multiindex与字符串索引boost :: unordered_map(Boost::Multiindex vs string indexed boost::unordered_map)[2024-01-10]
多索引不是你想要的,你似乎想要一个单一的索引,其类型是三元组。 (除非你确实需要三个独立的索引,如果我误解了,请发表评论。) 不要使用字符串,天堂没有。 只需使用三重键即可: typedef std::tuplekey_type; 如果你使用std::map ,你会得到对数查找,这可能就足够了,我认为你甚至不需要做更多的工作(不知道默认情况下是否为元组定义了字典对比)。 如果你想使用std::unordered_map ( ... -
根据您在代码中的注释,您已经编译了这个 g++ ./main.cpp -o test -std=c++11 由于您未指定优化级别,因此g ++使用默认设置,即-O0即无优化。 这意味着编译器没有内联任何东西。 标准库或boost等模板库依赖于内联的性能。 此外,编译器将产生大量额外的代码,这远远不是最佳的 - 在这样的二进制文件上进行性能比较没有任何意义。 在启用优化的情况下重新编译,然后再次尝试测试以获得有意义的结果。 Based on your comment in the code, you've ...
-
你不必编写你自己的数据结构,你可以使用std::reverse_iterator : typedef std::reverse_iterator
Rev; std::size_t idx = Rev(data) - std::max_element(Rev(data + N), Rev(data)) - 1; [现场示例] 或者,如果你想要的指针: int *p = std::max_element(Rev(data + N), Rev(data)).base() - 1; You don' ... -
要实现选项2,请为另一个类中的血清型定义一个枚举类型,然后编写一个模板化键提取器。 我不确定boost::multi_index_container支持reindexing(我怀疑它是否支持),所以这种方法可能从一开始就注定要失败。 class ... { enum Serotype { ... sup // 1 greater than the highest serotype }; ... }; template是的,你可以信赖它。 来自文档 : 可以直接从multi_index_container对象访问索引#0的功能而不使用get<0>() :例如, es.begin()等效于es.get<0>().begin() 。 Yes, you can rely on it. From the docs: The functionality of index #0 can be accessed directly from a multi_index_container object without using get ...这在文档中解释: 当跳过元素时,过滤器适配器必须知道何时停止,以避免超过基础范围的末尾。 因此,过滤器迭代器由一对迭代器构成,这些迭代器指示要遍历的未过滤序列中的元素范围。 从下面的源代码中,您可以看到始终检查它们是否已达到satisfy_predicate的结尾: void increment() { ++(this->base_reference()); satisfy_predicate(); } void satisfy_predicate() { while (this- ...
安全的Iterator.max(safe Iterator.max)[2023-11-06]
scalaz : MA.maximum 。 用法: import scalaz._; import Scalaz._ List(1, 2, 3).maximum == Some(3) List.empty[Int].maximum == None 唯一的问题是这不能直接与迭代器一起使用,所以你必须使用Stream代替(例如使用Iterator.toStream ) List(1, 2, 3).iterator.toStream.maximum = Some(3) scalaz: MA.maximum ...你遗漏了必不可少的部分:选择的索引类型。 不同的索引类型提供不同的接口 然后, equal_range意味着有序或无序的映射。 因为在无序地图上反转顺序是没有意义的,所以我将假设一个有序的地图。 接下来,使用make_tuple ,我猜测复合键。 #include#include #include #i ... 您遇到的具体错误出现是因为boost lambdas不是CopyAssignable。 这是实现相同消息的更简单方法: auto f1 = _1 > 100; auto f2 = f1; f2 = f1; // same error 如果你提供一个CopyAssignable仿函数来filtered ,boost.phoenix(无论如何你应该使用,boost.lambda正在弃用而不是凤凰),一个手写的结构,或者老忠实的std::bind2nd(std::greater(), 100) ... 相关文章
更多- 【原】storm源码之mac os x编译twitter storm源码
- mac10.9+php5.5.15+brew0.9.5的安装
- 【Hadoop实战】在Mac OS上编译 Hadoop Pipes 库
- Mac OS X 10.7.2下搭建hadoop1.0.3伪分布式模式
- mac10.9下eclipse的storm开发环境搭建
- 【Hadoop实战】在Mac OS上配置Hadoop伪分布式环境
- Hadoop应用笔记-入门伪分布式配置(Mac OS,0.21.0,Eclipse 3.6)
- learn C on the mac 读后笔记
- 转贴:操作系统概览X86平台 四大类约25种操作系统
- mac php solr扩展安装
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)