0

I’m trying to compile the node-addon example taken from :

https://nodejs.org/dist/latest-v6.x/docs/api/addons.html

I’m trying to do it on an offline system.

I’ve pointed node-gyp configure to a local source of node using –nodedir.

My problem is I’m getting a load of linker errors (9 in total) when I come to node-gyp build.

1>hello.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class v8::Isolate * __cdecl v8::Isolate::GetCurrent(void)" (__imp_?GetCurrent@Isolate@v8@@SAPEAV12@XZ)

and I don’t really understand why.

From what i understand the error is telling me that the header file i'm using (v8.h) needs a dll.

I’ve build both the node source and the v8 source and I can’t find any dll’s, just a bunch of .lib files in node…\build\release\libs.

I think it may have something to do with BUILDING_V8_SHARED nor USING_V8_SHARED but not sure how to set them.

Changing the Visual Studio flags in the properties does nothing.

I'm using node v6.9.4 with VS 2015 on windows 7

Thanks

ZachB
  • 13,051
  • 4
  • 61
  • 89

1 Answers1

0

Turns out this has nothing to do with the v8 libraries! The problem was the Visual Studio Solution would't compile with the node.lib file created when i built node.js from source. the .dll part was a bit of a red herring!

To get around this i built it on a system connected to the internet and copied over the folder in the .node-gyp folder (where it stores the downloaded .lib file and headers) and linked against that.

I don't know why i can't link against the .lib i had built but will let you know if i find out.