- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
在我的 C++ 项目中,我正在针对一个使用 OpenSSL 的库进行编译和链接。
我需要为默认安装了 openssl
的 BeagleBone 编译这个项目。我已经在我的开发机器上下载了 libssl-dev
。
因此,如果我在 x86_64
上为我的开发机器编译,我可以很好地编译项目,但我无法成功交叉编译:
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lssl
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcrypto
这表明我需要为 OpenSSL 使用 armhf
二进制文件,这似乎有点浪费,因为我将它们放在我的 BeagleBone 上,如果它可以耐心等待我部署它。
我自己绕过这个交叉编译 OpenSSL 的唯一方法是什么?然后我需要在哪里安装 .so
文件(我猜 make install
是个坏主意?)
最佳答案
This indicates I need to have armhf binaries for OpenSSL
正确。
which seems a bit of a waste really since I have them on my BeagleBone if it can just be patient and wait until I deploy it.
您似乎认为共享库仅在运行时需要,但事实并非如此。
ELF
代表可执行和链接 格式。 .so
在静态链接时非常需要在主可执行文件中构建各种表,然后加载程序将在运行时使用这些表来解析从主可执行文件到 的引用。所以
。
如果您熟悉 Win32,您可以将 .so
视为 Win32 .LIB
和 .DLL
的组合,打包成一个单个文件。
关于c++ - 使用共享动态库进行交叉编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32789598/
http://www.vex.net/~trebla/haskell/so.xhtml描述如何编译共享库。 关于编译命令: ghc -O2 -dynamic -shared -fPIC -o libE
我想从Rust调用一个C++动态库(* .so),但是我不想从Rust构建它。像这样, cc::Build::new() .file("src/foo.cc") .shared_fla
我想问一下,打包在ear中的war是否可以使用war文件中没有打包的库。我想在文件系统上拥有包含库的目录,部署的 war 文件将从该目录加载库。我还没有找到如何执行此操作的示例。所以我想问一下部署的w
我正在制作一个 C++ 库。在库中,我正在使用另一个静态库中的一些函数(例如 ref.a)。 我想生成一个库文件,mylib.a 或 mylib.so,这样使用我的库的任何程序都不需要链接到静态库 (
我正在尝试在 linux 中为一个使用 opencv 和 tesseract 以及动态链接的程序创建一个共享库 我关注了link我的代码如下 g++ -c Serial_Key.cpp -fPIC -
[编辑:简而言之,问题是:当我链接到一个链接到另一个动态库的动态库时,我是否也必须显式链接到那个?] 我在一个软件中看到了类似的东西。它不起作用,现在我想知道它是否应该起作用。我可以将库“bar”动态
我的项目中有一堆 Dll,使用 VStudio 9.0 编译器,预编译头文件用于我所有的 Dll。 dll 的加载过程由隐式调用程序完成(必须提供.dll、.lib 和 header )。 我通常为每
在我开始开发更多的 c++ 项目之前,我想建立一个良好的多平台环境并使用一些基本形式的修订 (rsync)。为此,我学习了如何构建 makefile(使用 uname 变量)并且还开始在 Window
我测试试,导出dll成功了,但是调用exe编译失败。 后来把声明代码改为了dllexport,调用exe编译成功了,调用也成功。 #pragma once #ifdef YOLOFACE_DLL_AP
我的问题很简单。有什么方法可以反编译、逆向工程 DYLIB 文件(MAC 的动态库,如 Windows DLL)。? 推荐什么程序这样做? 我正在寻找类似 Olly 或 IDA 之类的程序,但适用于
我已将我的应用提交到App Store,但遭到拒绝。我收到一封电子邮件,说: 无效的捆绑包-dylib搜索路径中不存在您的应用程序引用的一个或多个动态库。 我没有使用CocoaPods,所以所有外部框
我在 CPython 中使用 pythonnet,并且我成功安装了它 import clr clr.AddReference('Assembly') 确实有效。 在我的 C# 代码中,如果是成员 pu
GCC 简介有一个例子: $ gcc -Wall -L. main.c -lhello -o hello The option ‘-L.’ is needed to add the current d
我知道当您使用 dlopen() 加载动态 C++ 库时,您可以获得指向该库内函数的指针,但是有没有一种方法可以有效地(性能很重要)另一个怎么办? 我知道我可以在库中调用一个函数(在初始化库时),将一
给程序和库添加版本号和库,有利于维护和升级。 当然你可以在文件名上体现,比如有个程序叫 yun,文件名写为 yun_1.0.2,但这个需要每次手动维护,而且不能100%确保当前程序就是那个版本。所
我正在尝试将我的 C 程序链接到静态库和动态库以查看差异。我怎么做?我制作了自己的 Makefile: # ------ executable rule ----------- app : app.
假设我想创建一个动态库 dynamic.so,但我的代码引用了某个其他静态库 static.a 中存在的函数。自然地,如果我使用 g++ 和 -shared 选项进行编译和链接,dynamic.so
我想使用 alarm函数有一个中断来安排对 fcntl + F_SETLKW 的阻塞调用超时(用于锁定文件获取)。但是,我的代码位于共享库/dylib(主机应用程序的插件)中,alarm 的文档指出这
【目录】 第一个动态库文件 应用程序 第二个动态库文件 错误做法:直接给它改名 正解:patchelf 工具 One More Thing
什么是模块化编程 模块化编程就是我们一个复杂的项目分成很多模块,比如一个单片机项目,就可能分为:主函数模块,液晶显示和数码管显示模块,时间延时模块,温度传感器模块等。而一个程序工程包含多个源文件(.c
我是一名优秀的程序员,十分优秀!