How to use the ported library in the NaCl module?

I want to use openssl in my NaCl module. Fortunately, it is ported as in https://code.google.com/p/naclports/ . However, this is kind of a shame, but I don't know how to add the library to the toolchain. I did it as stated in the file Readme

:

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

And then I tried to compile this simple C code , and the compiler complains about some errors related to the linking problem with openssl/evp.h

.

This is my Makefile:. Please let me know how to do this.

+1


source to share


2 answers


NaCl is actually made up of several different sets of instruments. naclports will build and install this library only one of them. Libraries and headers are installed directly in the toolchain, so there is no need for -L or -I on the command line.

In this case, you have created and installed the newlib version of x86_64 for opensl. This means that you should be able to create a new x86_64 newlib version of your application (add TOOLCHAIN ​​= newlib NACL_ARCH = x86_64 to your call).



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

+2


source


Build naclports. See naclports / README.rst instructions.



+1


source







All Articles