- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试在 mac os 10.7 下的 eclipse 中编译一些东西,但构建失败了:
Undefined symbols for architecture x86_64:
"_kCFAllocatorDefault", referenced from:
___GLeeGetProcAddress in GLee.o
"_CFURLCreateWithFileSystemPath", referenced from:
___GLeeGetProcAddress in GLee.o
"_CFStringCreateWithCString", referenced from:
___GLeeGetProcAddress in GLee.o
"_CFBundleCreate", referenced from:
___GLeeGetProcAddress in GLee.o
"_CFBundleGetFunctionPointerForName", referenced from:
___GLeeGetProcAddress in GLee.o
"_CFRelease", referenced from:
___GLeeGetProcAddress in GLee.o
"_glGetString", referenced from:
___GLeeGetExtensions in GLee.o
_GLeeGetExtStrGL in GLee.o
_GLeeInit in GLee.o
(maybe you meant: _GLee_Lazy_glGetStringi, _GLeeFuncPtr_glGetStringi )
"___CFConstantStringClassReference", referenced from:
CFString in GLee.o
所以我知道问题出在 ld 符号上。现在我尝试去项目属性并在 eclipse 中将 -framework CoreFramework 添加到 g++ 和 gcc 的参数,但这并没有解决它。
这些符号位于何处,更重要的是 - 如何将它们添加到我的项目中?
最佳答案
我通过向链接器添加 .dylib 来修复此问题。如何设置?
假设您有一个要添加的名为“libMyLib.dylib”的 dylib 文件,位于/opt/local/lib/MyLibrary
在显示库的窗口的一部分添加行“我的图书馆”在显示库搜索路径的窗口的一部分添加行“/opt/local/lib/MyLibrary/”
=> eclipse 会自动执行此操作:1.在字符串前加上“lib”2. 在你的字符串后添加“.dylib”
Mac 出现了另一个问题...假设您使用了 CoreFoundation 框架中的符号。 Mac OS 框架本质上是带有头文件的动态库……如果您不确定,可以随时通过“file myFile”进行检查
问题是 eclipse 永远不会正确地从 MAC OS SDK 和/System/Library/Frameworks/中获取那些 dylib,因为它们没有添加 .dylib。诀窍是简单地转到 dylib 所在的位置(即使它的名称中没有 .dylib)例如 cd/System/Library/Frameworks/CoreFoundation.framework
然后复制文件并添加dylib(不要重命名!!!)
file CoreFoundation
CoreFoundation (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
CoreFoundation (for architecture i386): Mach-O dynamically linked shared library i386
#copy the lib and name it to "eclipse friendly format"
cp CoreFoundation libCoreFoundation.dylib
关于c++ - undefined symbol 体系结构 x86_64 的 undefined symbol : "_kCFAllocatorDefault",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9955105/
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我遇到了这两个文档(它们是用意大利语写的,尽管代码注释是英文的): http://home.deib.polimi.it/brandole/acsocr/L13%20-%20Generic%20Ass
我的主要目标是提供一个用 jquery 编写的基于 solr 的搜索应用程序。 (不熟悉solr的,就假设它是一个可以返回搜索结果的rest api。)为了这个目标,我编写了许多小型应用程序和 ser
这个问题是关于选择“正确”类型的NoSQL数据库的,我希望甚至可以根据我将在下面列出的一些需求/用例以及当前正在使用的传统RDBMS解决方案,讨论特定的数据库以及它们为什么适用。地点。时间长了一点,但
在 Java 中我运行: System.out.println(Math.log(249.0/251.0)); Output: -0.008000042667076265 在 C# 中我运行:<- 已
我目前正在考虑通过 Redux 将 Context 实现到我们的一个应用程序中,但是,我似乎找不到任何关于什么是大型应用程序的最佳结构的信息? Redux 有一个定义的方法来创建 reducer、ac
我正在使用 mailcore 框架,但收到错误消息“archtecture x86 的重复符号”以及“找不到选项的目录” 下面是错误日志。 Ld /Users/user/Library/Develop
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它. 11 个月前关闭。 Improve t
假设我正在从 C++ 移植代码并需要在 C# 中模拟相同的位移技术: 每当我执行位移时,我是否必须考虑架构的 Endain-ness? 最佳答案 没有。位移是一种纯粹的代数运算。它不比乘以二更依赖于平
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
关于架构 XXX 的重复符号有很多问题,但我没有得到我的问题的答案。在我的场景中,我使用 Cocoapod,并导入 FMDB,但是当我集成另一个第三方 SDK 时,当我构建项目时,出现如下错误: 是否
我无法编译我的 Xcode 项目,它有重复的 ParseFacebookUtilsV4 问题 这是我的苹果 Mach-O 链接器错误: duplicate symbol _llvm.cmdline i
我对使用 MFC 的内置文档 View 体系结构的必要性有疑问。我得到了一个基于对话框的旧项目,我必须在其中用框架替换主对话框并添加功能区。它有一种文档 View 架构,创建时没有内置类,我更愿意在新
我正在构建一个协作创作工具,该工具允许用户共同编辑信息空间,该信息空间是节点和链接的可视化。一个客户端应用程序中所做的更改需要反映到所有其他客户端中。由于它是可视化的,因此可能需要经常更新潜在的大数据
如果我在 Windows(x86 和 x64)下的 .NET 上运行涉及 System.Double 的复杂计算,然后在 Mono(Linux、Unix 等)上运行,绝对有保证 以在所有情况下得到完全
当我使用 Xcode 4.6 编译我的 iPhone 应用程序时,我看到一个奇怪的错误代码: "duplicate symbols for architecture i386". 我知道这个关于文件名
我最近询问了 System.Double,并被告知计算可能因平台/架构而异。不幸的是,我找不到任何信息来告诉我这是否适用于 System.Decimal。 对于任何特定的 decimal 计算,无论平
我有一些实体,例如:Customers、Orders、Invoices。 对于它们中的每一个,我都将它们的CRUD 操作 和一些其他界面分组为:ISvcCustomerMgmt、ISvcOrderMg
这个问题有点像一个池。我们正在尝试在使用 LINQ to SQL 之类的 ORM 时确定最佳架构。我们正在定义的架构是用于其他应用程序将通过直接引用 DLL 或通过 Web 服务访问的框架。我们有 .
请就如何为 Java web 应用程序做“插件”架构提出建议。 目前我们在 Tomcat servlet 容器中使用非常简单和标准的 Spring+Hibernate+Struts 2。 (使用 ma
我是一名优秀的程序员,十分优秀!