42 lines
1.7 KiB
Markdown
42 lines
1.7 KiB
Markdown
|
get-symbol-from-current-process-h
|
||
|
=================================
|
||
|
### C function to get a symbol from the current process
|
||
|
|
||
|
[](https://greenkeeper.io/)
|
||
|
|
||
|
[](https://npmjs.org/package/get-symbol-from-current-process-h)
|
||
|
[](https://npmjs.org/package/get-symbol-from-current-process-h)
|
||
|
[](https://travis-ci.org/node-ffi-napi/get-symbol-from-current-process-h?branch=master)
|
||
|
[](https://coveralls.io/r/node-ffi-napi/get-symbol-from-current-process-h?branch=master)
|
||
|
[](https://david-dm.org/node-ffi-napi/get-symbol-from-current-process-h)
|
||
|
|
||
|
The information presented below is specific to usage for building with `npm` and `gyp`.
|
||
|
|
||
|
Installation
|
||
|
------------
|
||
|
|
||
|
Install with `npm`:
|
||
|
|
||
|
``` bash
|
||
|
$ npm install get-symbol-from-current-process-h
|
||
|
```
|
||
|
|
||
|
Usage
|
||
|
-----
|
||
|
|
||
|
In your `binding.gyp`:
|
||
|
|
||
|
```python
|
||
|
'include_dirs': ["<!@(node -p \"require('get-symbol-from-current-process-h').include\")"],
|
||
|
```
|
||
|
|
||
|
(Just have `"<!@(node -p \"require('get-symbol-from-current-process-h').include\")"` somewhere in that list, ok?)
|
||
|
|
||
|
In your C code:
|
||
|
|
||
|
```c
|
||
|
#include <get-symbol-from-current-process.h>
|
||
|
|
||
|
void* sym = get_symbol_from_current_process("foobar");
|
||
|
```
|