I have .lib static library - windows. How correctly include it to node-gyp project. I did it, but I caught error LNK2001: unresolved external symbol
. I think, I add library incorrectly. This libriary is tdlib (telegram database library). Thank you for your help!
My binding.gyp file
{
"targets": [
{
"target_name": "td_json",
"sources": [ "lib.cc" ],
"libraries": [
"<(module_root_dir)/td/build/Release/tdjson.lib"
],
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")"
],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
],
"copies": [
{
"destination": "<(module_root_dir)/build/Release/",
"files": [
"<(module_root_dir)/td/build/Release/tdjson.dll" ]
}
],
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ]
}
]
}