如何使用移植库在NaCl模块? [英] How to use ported library in NaCl module?

查看:353
本文介绍了如何使用移植库在NaCl模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用的OpenSSL库在我的NaCl模块。幸运的是,它已经移植在的https://$c$c.google.com/p / naclports / 。然而,它的种类可惜,但我不知道如何将库添加到工具链。我在自述文件文件并按照指示:

I want to use openssl library in my NaCl module. Luckily it is ported already as in https://code.google.com/p/naclports/. However, its kind of pity but I don't know how to add the library to the toolchain. I did as instructed in the Readme file:

... nacl_sdk / pepper_33 / naclports / src目录$蟒蛇build_tools / naclports.py将OpenSSL安装
  已安装'OpenSSL的'[x86_64的/ newlib]

...nacl_sdk/pepper_33/naclports/src$ python build_tools/naclports.py install openssl Already installed 'openssl' [x86_64/newlib]

然后我试图编译这个简单的C code ,编译器抱怨一些错误这是因为的OpenSSL / evp.h 连接问题。

And then I tried to compile this simple C code, and the compiler complaint some errors which are because of linking problem with openssl/evp.h.

这是我的Makefile:链接。请让我知道如何使它运行。

This is my Makefile: link. Please let me know how to make it run.

推荐答案

氯化钠实际上是由几个不同的工具链。 naclports将建立并在安装时给定的库只是其中之一。该库和头得到直接安装在工具链,所以没有必要在命令行中-l或-I。

NaCl actually consists of several different toolchains. naclports will build and install a given library to just one of them at time. The libraries and headers get installed directly into the toolchain so there is no need to -L or -I on the command line.

在这种情况下,你已经构建并安装了OpenSSL的x86_64的newlib版本。这意味着你应该能够建立自己的应用(工具链= newlib NACL_ARCH = x86_64的添加到您发出呼叫)的x86_64的newlib版本。

In this case you have built and installed the x86_64 newlib version of openssl. This means that you should be able to build the x86_64 newlib version of your app (add TOOLCHAIN=newlib NACL_ARCH=x86_64 to your make call).

要建立的OpenSSH的所有其他版本你可以在naclports的顶层(例如./make_all.sh的OpenSSL)使用make_all.sh脚本。

To build all the other versions of openssh you can use the "make_all.sh" script at the top level of naclports (e.g. ./make_all.sh openssl).

这篇关于如何使用移植库在NaCl模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆