MacOS 链接特性:Two-Level Namespace

libfactory.so (native:vendor) can not link against libcustom_nvram(native:ndk:libc++:static) 可能是为不同的CPU架构(如armeabi-v7a、arm64-v8a、x86等)编译的。确保两个库都是为相同的ABI编译的。看起来是通过NDK(Native Development Kit)构建的,并且可能使用了。可能是静态链接的,这可能导致它在运行时与其他动态链接的库不兼容。或其他库,并且设备上安装的版本与此不匹配,则可能会发生问题。分区上的库可能受到额外的限制,不能轻易与其他分区(如。可以访问的范围内,并且具有正确的读取权限。可能依赖于某些特定的库或版本,这些库在。期望动态链接,则可能会出现问题。 阅读详情

在 MacOS 编译链接时,可能经常会报找不到符号的错误,本文所介绍的 two-level namespace 的链接特性可能就是报错原因之一。

本文为笔记附带翻译,想看详细内容的话,在文末附上了参考链接,由于篇幅不算大,所以我简单地翻译了一下,如有错误,帮忙指出,多多包涵。

1、Two-Level Namespace & Flat Namespace

When an executable file is loaded into a program, the dynamic linker (the part of the system responsible for loading code on demand) attempts to find all of the unresolved symbols (functions in other executable files). 【可执行文件被加载到程序内存当中时,动态链接器需要查找所有的未解析符号】

In order to do this, it needs to know which libraries contain those symbols. So when the program is built, you must specify the libraries that contain those functions to the static linker (the part of the build system responsible for linking object files together). The static linker places the names of those libraries into your program’s executable file. 【它得知道符号在什么库,所以编译程序时就需要给静态链接器指明包含这些函数的库。静态链接器将这些库的名字放入可执行文件当中】

The problem is that the static linker in Mac OS X 10.0 records only the names of the libraries, but not which functions are to be found in each of libraries. Therefore, it’s not possible to load two libraries containing a definition of the same symbol name, because it’s not possible to determine which library you really wanted the symbol from. 【问题来了,MacOS 10.0 只记录库的名字,而没有指明哪个函数来源于哪个库。因此带有同名函数的两个库将无法区分】

This isn’t usually a problem on Mac OS X 10.0, because the build system will give you a multiple-defined-symbols error message when you attempt to build your application using libraries that contain a symbol with the same name. But consider the following situations. 【所幸 MacOS 10.0 会报错,但还有一下情况:】

  • Future versions of the system may export symbols which conflict with those implemented in your application. This will prevent users from being able to use your application. 【新版本系统库的符号和你程序里的库符号冲突】

  • If your application supports third-party plugins or bundles, libraries used by your third-party developers may conflict with each other. 【第三方扩展冲突】

To solve this problem, the Mac OS X 10.1 runtime environment supports a new feature that records the names of symbols expected to be found in a library along with the library name. An executable file built with this feature enabled is called a two-level namespace executable. An executable file without this feature is called a flat namespace executable. 【MacOS 10.1 推出 two-level namespace 特性作为解决方案,即记录库名+符号名;没有这个特性的就叫 flat namespace 】

1.1、ld manual

这部分内容是我直接在命令行用 man ld 看的。

Two-level namespace

By default all references resolved to a dynamic library record the library to which they were resolved. At runtime, dyld uses that information to directly resolve symbols. The alternative is to use the -flat_namespace option. With flat namespace, the library is not recorded. At runtime, dyld will search each dynamic library in load order when resolving symbols. This is slower, but more like how other operating systems resolve symbols. 【默认会记录库名+符号,运行时 dyld 运用这个信息直接解析符号,这种方式会快很多。】

Alters how symbols are resolved at build time and runtime. 【改变的是编译时和运行时解析符号的方式】

With -two_levelnamespace (the default), the linker only searches dylibs on the command line for symbols, and records in which dylib they were found. 【默认的 two-level namespace,链接器只从参数中提供的库搜索符号,并记录符号在什么库被找到】

With -flat_namespace, the linker searches all dylibs on the command line and all dylibs those original dylibs depend on. The linker does not record which dylib an external symbol came from, so at runtime dyld again searches all images and uses the first definition it finds. In addition, any undefines in loaded flat_namespace dylibs must be resolvable at build time. 【flat namespace,链接器会从参数中搜索所有的库,以及它们所依赖的库。链接器不记录符号来自于哪个库,所以在运行时 dyld 又会搜索所有的映像,用它找到的第一个定义。此外,未定义符号必需在编译时解析完成。】

Indirect dynamic libraries

If the command line specifies to link against dylib A, and when dylib A was built it linked against dylib B, then B is considered an indirect dylib. When linking for two-level namespace, ld does not look at indirect dylibs, except when re-exported by a direct dylibs. On the other hand when linking for flat namespace, ld does load all indirect dylibs and uses them to resolve references. Even though indirect dylibs are specified via a full path, ld first uses the specified search paths to locate each indirect dylib. If one cannot be found using the search paths, the full path is used. 【如果参数指明链接 A,而 A 依赖 B,那么 B 就是间接依赖库。使用 two-level namespace 特性时,ld 不会去查找间接依赖库,除非其符号被直接依赖库重新导出。如果是 flat namespace,ld 会加载所有的间接依赖库并用它们解析符号。即使间接依赖库以绝对路径指明,ld 还是先用指明的搜索路径来定位间接依赖库。如果搜索路径找不到,采用绝对路径。】

Dynamic libraries undefines

When linking for two-level namespace, ld does not verify that undefines in dylibs actually exist. But when linking for flat namespace, ld does check that all undefines from all loaded dylibs have a matching definition. This is sometimes used to force selected functions to be loaded from a static library. 【当使用 two-level namespace 特性时,ld 不会检查库中未定义符号是否存在。但当使用 flat namespace 特性时,ld 会从所有已加载的匹配到函数定义的库中检查所有的未定义符号。有时用于强制从静态库中加载函数。】

1.2、如何判断一个文件使用的是哪种链接特性

otool -hV [file]

image.png

如果有 TWOLEVEL 字样的,即为 two-level namespace 特性,否则为 flat namespace。

2、使用 two-level namespace 的问题

  • There can be no unresolved, undefined references in two-level namespace executables. Using the -undefined suppress option will cause this error:

/usr/bin/ld: -undefined error must be used when -twolevel_namespace is in effect

If you recieve this error message, you need to remove the -undefined suppress option and make sure you specify the path to the program you are linking against with the option *-bundle_loader pathnameToYourProgram*.

If you are linking against a framework, this path is already specified using the -framework option, so you just need to remove the -undefined suppress option. (To be really paranoid, specify the -undefined error option). See the next section for more information.

【two-level namespace 不能有未解析或未定义的引用,所以用了 -undefined suppress 会报错。

需要去掉这个参数并使用 -bundle_loader XXX 来指明链接路径。或者如果是链接 framework 去掉参数即可,因为 -framework 已经指明了路径。】

  • When building a two-level namespace executable, you must link against all shared libraries containing the symbols you reference. If your program is currently a flat namespace executable, this may cause problems. When you build a flat namespace executable, the dynamic linker will search all libraries for the program’s undefined symbols, even libraries that your code did not explicitly link against.

For example, your application might link against ApplicationServices.framework, but not CoreFoundation.framework. Because ApplicationServices.framework links to CoreFoundation.framework, you can, as a flat namespace executable, use routines exported by CoreFoundation.framework. If you build the program as a two-level namespace executable, using routines exported by CoreFoundation.framework will result in undefined-symbol errors, so you must explicitly add CoreFoundation.framework to the list of libraries you link.

If you use a symbol from a library that you are not explicitly linking against, you will get a single error message for each such library of the form:

ld: object_file illegal reference to symbol: symbol defined in indirectly referenced dynamic library: library

If you see this error message, you must add the library library to your link command.

If library is a sub-framework of an umbrella (for example, HIToolbox.framework is a subframework of Carbon.framework), you will need to add the umbrella framework to your link objects (in Project Builder, just drag the framework into your project). Once you explicitly link against an umbrella framework, you may freely use all of the symbols it contains without referencing any sub-frameworks.

【two-level namespace 会导致间接链接的符号未定义的错误,你可能需要显式地指明间接链接的库。】

3、dyld 查找符号过程

The runtime symbol lookup routines released in Mac OS X 10.0 (located in the header <mach-o/dyld.h> and listed below) perform lookups in the flat, global symbol namespace, and thus, when you use them to find symbols in your plugins, may not return the intended symbols in for two-level namespace applications. 【之前 MacOS 10.0 查找符号的方法,不适用于 two-level namespace。】

Applications built as two-level namespace executables should instead use the following new routines. 【需要用到下面的方法操作】

  • NSAddImage

  • NSIsSymbolNameDefinedInImage

  • NSLookupSymbolInImage

3.1、NSAddImage

const struct mach_header *
NSAddImage(
    char *image_name,
    unsigned long options);

// No options.
#define NSADDIMAGE_OPTION_NONE                  0x0

// If an error occurs and you have specified this option, NSAddImage returns NULL. 
// You can then use the function NSLinkEditError to retrieve information about the error.
#define NSADDIMAGE_OPTION_RETURN_ON_ERROR       0x1

// With this option the image_name passed for the library and all its dependents will be effected 
// by the various DYLD environment variables as if this library were linked into the program.
#define NSADDIMAGE_OPTION_WITH_SEARCHING        0x2

// With this option, NSAddImage will not load a shared library that has not already been loaded. 
// If the specified image_name is already loaded, NSAddImage will return its mach_header.
#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4

NSAddImage loads the shared library specified by image_name into the current process, returning a pointer to the mach_header data structure of the loaded image. Any libraries that the specified library depends on are also loaded. 【把 image_name 加载到进程,返回被加载映像的 mach_header 指针。间接依赖也会被加载。】

If the shared library specified by image_name is already loaded, the mach_header already loaded is returned. 【如果已加载过了,则返回已有的。】

The image_name parameter is a pointer to a C string containing the pathname to the shared library on disk. For best performance, specify the full pathname of the shared library — do not specify a symlink. 【参数为绝对地址性能更好,不要用符号链接】

3.2、NSLookupSymbolInImage

extern NSSymbol
NSLookupSymbolInImage(
    const struct mach_header *image,
    const char *symbolName
    unsigned long options);

// Bind the non-lazy symbols of the module in the image that defines the symbolName 
// and let all lazy symbols in the module be bound on first call.
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND            0x0

// Bind all the non-lazy and lazy symbols of the module in the image that defines the symbolName 
// and let all dependent symbols in the needed libraries be bound as needed.
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW        0x1

// Bind all the symbols of the module that defines the symbolName and all if the dependent symbols of all needed libraries.
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY      0x2

// Return NULL if the symbol cannot be bound.
#define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4

NSLookupSymbolInImage returns the specified symbol (as an NSSymbol) from the specified image.Error handling for NSLookupSymbolInImage is similar to error handling for NSAddImage. 【返回指定映像的指定符号】

The image parameter is a pointer to a mach_header data structure. You can get this pointer from a shared library by calling NSAddImage. 【image 参数是 mach_header 的指针,可以配合 NSAddImage 使用。】

The symbolName parameter is a C string specifying the name of the symbol to retrieve. 【symbolName 参数是 C 字符串,指明要查找的符号。】

3.3、NSIsSymbolNameDefinedInImage

extern enum DYLD_BOOL
NSIsSymbolNameDefinedInImage(
    const struct mach_header *image,
    const char *symbolName);

NSIsSymbolNameDefinedInImage returns true if the specified image (or, if the image is a framework, any of its subframeworks) contains the specified symbol, false otherwise. 【用于判断指定的映像是否包含指定的符号】

3.4、获取 mach_header 的方法

The image parameter for NSLookupSymbolInImage and NSIsSymbolNameDefinedInImage is a pointer to the mach_header data structure of a Mach-O shared library. You can obtain a pointer to a mach_header data structure from:

  • the NSAddImage function

  • a linker defined symbol as defined in <mach-o/ldsym.h>, described on the ld(1) man page

  • the dyld(3) function _dyld_get_image_header(3)

  • the mach_header arguments to the callback functions called from _dyld_register_func_for_add_image(3).

参考&推荐阅读

Mac OS X Developer Release Notes:Two-Level Namespace Executables - http://mirror.informatimago.com/next/developer.apple.com/releasenotes/DeveloperTools/TwoLevelNamespaces.html

【信息科学与工程学】【数据中心】第三十五篇 云计算数据中心的学科知识04 编号学科(课程)核心知识点在云计算/云存储/云网络/云安全/云MaaS中的作用代表教材/资料/论文 + 数学方程式列表工业界应用D1421​云原生数据库:TiDB​HTAP(混合事务/分析处理)、分布式SQL、水平扩展、强一致(Raft)、自动故障恢复、与MySQL兼容、TiFlash列式引擎提供弹性扩展的分布式数据库;支撑高并发在线交易与实时分析教材:《TiDB in Action》PingCAP(2020) 论文:《TiDB: A Raft-based HTAP Database》(2017) 阅读详情

相关推荐

DDR3性能优化实战:如何用Xilinx MIG控制器实现800MHz稳定读写(7系列FPGA版)

本文深入探讨了在Xilinx 7系列FPGA上使用MIG控制器实现DDR3存储器800MHz稳定高速读写的实战优化技巧。文章聚焦于高级时序调优、Bank Machine调度策略、用户接口设计优化以及利用ILA进行信号完整性调试,旨在帮助工程师突破性能瓶颈,实现接近理论峰值的稳定带宽,并为进一步冲刺更高频率提供进阶调参指南。

seed的博客 775

gcc编译出现undefined reference to 的问题

拓展程序功能,并用gcc编译,结果在添加了库后出现问题 gcc -o main main.c 编译错误提示: /usr/bin/ld: /tmp/cckwgwIa.o: undefined reference to symbol 'sin@@GLIBC_2.2.5' /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO mis

平常心的小屋 2万+

SFM(structure from motion 从运动恢复结构)和MVS(multi-view stereo 多视图立体视觉)

主要目的:SFM是重建稀疏点云的,MVS重建的是稠密点云。 输入的数据:SFM是没有标定的数据,而MVS输入的是标定的数据。 为什么SFM无法重建出稠密的点云,但是MVS可以? SFM中我们用来做重建的点是由特征匹配提供的!这些匹配点天生不密集!MVS则几乎对照片中的每个像素点都进行匹配,几乎重建每一个像素点的三维坐标,这样得到的点的密集程度可以较接近图像为我们展示出的清晰度。 SFM和MVS关系 SFM给MVS算好了输入视角的位姿,内参,稀疏点云以及它们的共视关系,MVS再利用这些信息以及彩色图

Vpn_zc的博客 1万+

/usr/bin/ld: libfl.so:undefined reference to `yylex‘

按照该教程https://aquamentus.com/flex_bison.html学习flex和bison时,遇到了如下问题 /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfl.so: undefined reference to `yylex' collect2: error: ld returned 1 exit status flex文件: %{ #include <cstd

benladeng29hao的博客 5293

OpenRadar Matlab版:毫米波雷达信号处理全流程开源库详解

毫米波雷达数据解析与信号处理是感知领域的基础能力。本文介绍毫米波雷达从ADC原始采样到距离-多普勒(Range-Doppler)热图、CFAR检测、DOA估计直至点云与生命体征参数提取的完整处理链路,并深入讲解OpenRadar(Matlab版)开源库的内核设计、核心API与实测经验。从原理上看,距离FFT与多普勒FFT构成RD谱,CFAR自适应阈值实现目标检测,相位解缠与滤波用于呼吸心跳提取。技术价值在于将繁琐的雷达数据读取、矩阵变换和算法流程标准化,免去重复造轮子。可应用于人员存在感知、生命体征监护、4

weixin_33806859的博客 322

FMT(基于rtthread)开源代码编译 win10下编译环境搭建及编译

FMT(基于rtthread)开源代码编译 win10下编译环境搭建及编译 什么是Firmament? Firmament (FMT) 是一款基于模型设计 (Model-Based-Design, MBD) 的开源自驾仪,可被用来快速构建无人机,无人车,无人船,机器人等平台的控制系统。 系统主要由两部分构成. FMT-Firmware: 一个基于C/C++开发的稳定、高性能的嵌入式系统. FMT-Model: 一个基于MATLAB/Simulink开发的仿真框架以及算法库. 昨天得知FMT开源飞控项目已经开

weixin_45786595的博客 2872

Linux动态库链接问题常见错误(/usr/bin/ld或者undefined reference to)报错

Linux系统下编译和运行程序时候,经常出现动态库链接的问题,主要有两种情况,一种是编译的时候链接问题,另一种是运行的时候链接。

weixin_45533366的博客 1万+

Android Audio - 支持多应用同时录音_Android8.1修改方法

支持多应用同时录音_Android8.1修改方法 源码路径: sdk\frameworks\av\services\audiopolicy\managerdefault\AudioPolicyManager.cpp 需要修改两个位置: audio_io_handle_t AudioPolicyManager::getInputForDevice() 在mpClientInterface-&gt...

iFinelio Tower 的博客 5758

解决opencv /usr/bin/ld: ./src/flann.o: undefined reference to symbol ‘12SearchPa_ZN2cv5flannramsC1Eifb

为了正确链接和使用flann.o文件,我们需要确保在编译和链接的过程中正确地包含FLANN相关的头文件,并指定正确的FLANN库路径和名称。这样,编译器和链接器就能够找到flann.o文件中定义的函数和数据结构,进行正确的链接。首先,我们可以检查库的链接顺序,确保所需的库在链接命令中正确地出现在使用它们的源文件之后。在编译和链接命令中,库的链接顺序很重要,因为链接器是按照给定的顺序解析符号的。确保你的编译环境中安装的OpenCV版本与你的代码兼容,并且所需的库函数在你使用的版本中可用。

牛肉胡辣汤 548

YOLOv11 改进 - 主干网络| 清华大学CloFormer AttnConv :利用共享权重和上下文感知权重增强局部感知,注意力机制与卷积的完美融合

本文介绍了轻量级视觉变换器CloFormer及其核心模块AttnConv在YOLOv11中的结合应用。为解决视觉变换器缩小到移动设备友好尺寸时性能下降的问题,提出CloFormer,其引入AttnConv操作符。AttnConv融合共享权重和上下文感知权重,先通过深度卷积提取局部表示,再用上下文感知权重增强特征,还结合传统注意力减少FLOPs,使模型感知高频和低频信息。我们将AttnConv集成进YOLOv11,实验表明,CloFormer在多个视觉任务中表现优越,改进后的YOLOv11也取得了良好实验结果

魔改工程师的博客 989

图机器学习(7)——图神经网络 (Graph Neural Network, GNN)

图神经网络 (Graph Neural Network, GNN) 是一类专门处理图结构数据的深度学习方法。这类方法也被称为几何深度学习 (geometric deep learning),在社交网络分析、计算机图形学等众多领域正受到日益广泛的关注。在本节中,我们介绍了 GNN 的核心原理,将卷积等经典深度学习范式拓展至非欧几里得图空间,实现了局部结构与全局特征的层次化提取。

盼小辉丶的博客 1万+

ld 无法找到项目符号 链接失败_MacOS 链接特性:Two-Level Namespace

在 MacOS 编译链接时,可能经常会报找不到符号的错误,本文所介绍的 two-level namespace 的链接特性可能就是报错原因之一。本文为笔记附带翻译,想看详细内容的话,在文末附上了参考链接,由于篇幅不算大,所以我简单地翻译了一下,如有错误,帮忙指出,多多包涵。1、Two-Level Namespace & Flat NamespaceWhen an executable fi...

weixin_39975529的博客 354

lammps教程:聚合物压缩,避免“bond atoms missing”

如果使用ms建模,聚合物的链会伸出到盒子外面,在导出data文件后,盒子外面的原子被周期性算法折叠进盒子对面,这就造成了边界附近的bond原子可能被分布到了盒子的两侧。并且,这个data文件不能使用npt系综进行压缩,npt系综必须使用周期性边界,在压缩时,bond原子同样会移动到对面的边界。所以,最好的解决办法是使用一个反射墙墙进行压缩,设置一个反射墙墙既可以实现压缩效果,也可以组织原子跨越box边界移动到对面。解决这个问题的原则只有一个:导出data时确保所有的bond原子没有跨越边界。

lammps_jiayou的博客 3819

Docker 学习:术语、使用、Compose、Swarm

Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从 Apache2.0 协议开源。Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器完全使用沙箱机制,相互之间不会有任何接口(类似 iPhone 的 app),更重要的是容器性能开销极低。

freeking101的博客 6167

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

C++宏编程全解析:从预处理器原理到现代替代方案

预处理器是C/C++编译流程中的关键环节,它在编译前执行文本替换和条件编译等操作。其核心机制基于简单的文本替换原理,不涉及语法分析和类型检查,这既是其灵活性的来源,也带来了运算符优先级和参数多次求值等经典陷阱。在工程实践中,宏技术为跨平台开发、条件编译和代码生成提供了基础支持,特别是在管理平台相关代码和调试日志系统时展现出独特价值。通过理解预处理器的工作原理,开发者可以更好地利用宏进行条件编译和代码生成,同时规避常见风险。本文深入探讨了C++宏的底层机制、高级技巧如字符串化和标记连接,以及在现代C++中如何

weixin_30292843的博客 379

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

pybind11绑定C++项目心得

本文记录了一些pybind11库的使用方式,并记录了一些实操过程中需要注意的地方,供大家学习

专注技术分享 1320

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

python3 核心笔记

本文主要是针对python3的一些核心要点做一些记录,感兴趣的可以关注和订阅。会持续更新,这个玩意学习一下,可以为数据分析和AI打下一定的基础。

yanghuashuiyue的专栏 617

Android系统 —— 源码编译错误整理(持续更新)

目录1. 更改源码目录名引发的错误 1. 更改源码目录名引发的错误 FAILED: out/target/product/gin/abl.elf /bin/bash -c "\$(pwd)/prebuilts/build-tools/linux-x86/bin/make -C bootable/bootloader/edk2 BOOTLOADER_OUT=../../../out/target/product/gin/obj/ABL_OBJ all PREBUILT_HOST_TOOLS=CC

In_engineer的博客 2万+

/usr/bin/ld: /tmp/: undefined reference to symbol ‘_ZN2cv6imreadERKSsi‘ rror adding symbols: DSO mis

在某个项目中把opencv2.4升级到4.4时,遇到下面的错误: /usr/bin/ld: /tmp/ccV9xYuG.o: undefined reference to symbol '_ZN2cv6imreadERKSsi' /opt/opencv-4.4.0-build/lib64/libopencv_imgcodecs.so.4.4: error adding symbols: DSO missing from command line collect2: error: ld returned

C/C++、嵌入式开发、深度学习算法、模型部署与推理优化 2809

Android 12,调用系统库libft2.so 遇到的各种问题记录

(vendor静态库中调用libft2.so会简单点,没这么麻烦)【问题1】本地debug尝试修改:为了本地环境debug调试方便,我找了个 mk文件,在里面添加了引用libft2.so然后通过来验证,是否能成功引用libft2.so网络上找了很多资料,也尝试了很多的方法,不过都没效果。

1766

ceres的错误(ps:cmake的学习):/usr/bin/ld:xxx undefined reference to `ceres::Problem::~Problem()“

/usr/bin/ld:xxx undefined reference to `ceres::Problem::~Problem()" 之类错误,cmake的一个小复习

weixin_41967369的博客 3013

记一次VCS报错:/usr/bin/ld: undefined reference to `pthread_yield‘

1.首先备份文件,文件目录vcs_mx_vO-2018.09-SP2/linux64/lib/vcs_save_restore_new.o;我的设备:ubuntu2204+VCS2018。2.替换符号表中的pthread_yield;

m0_50662459的博客 2997

调用g2o库报错“/usr/bin/ld: 找不到 -lg2o_core”的解决方法

视觉SLAM十四讲中调用g2o库,编译时出现找不到g2o相关模块和函数的错误,原因是新版g2o库名变化,修改CMakeLists中链接的库名后解决

qq_43504325的博客 971

Android10报错:error: libxxx (native:vendor) should not link to libxxx (native:platform)(一百一十七)

error: libxxx (native:vendor) should not link to libxxx (native:platform)声明将 vendor module放入vendor分区(vendor native);未声明该属性的module将放在system分区(platform native),且这两个分区是不能进行链接的。

Android系统攻城狮 5094

xcode 调用静态库失败,提示找不到到,,链接函数,,Undefined symbols for architecture arm64

结果; .mm文件中才能引用,,c++d库函数 把.m文件改后最,ok

xqwin的专栏 1486
上一篇: c++ goto & label 机制汇编探索
下一篇: MacOS 下的动态链接
流左沙
博客等级 码龄11年 46粉丝 55原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值