[nodejs] Re: LNK2005/LNK1169 errors while creating a C++ module

2013-07-04 Thread Floby
If you're compiling with Visual Studio you could also add a `#pragma once` to your header file... Just in case :) On Wednesday, 3 July 2013 15:28:08 UTC+2, Alex Netkachov wrote: > > I'm working on the node.js module in Visual Studio and have the following > file structure: > > load.h > > #i

[nodejs] Re: LNK2005/LNK1169 errors while creating a C++ module

2013-07-03 Thread Alex Netkachov
Thank you very much Bert! Now it works well and I finally can split my one very big file into chunks :) On Wednesday, 3 July 2013 18:43:51 UTC+1, Bert Belder wrote: > > > You need to include in all your .cpp files before requiring > anything else. > > node.h picks up that BUILDING_NODE_EXTENSIO

[nodejs] Re: LNK2005/LNK1169 errors while creating a C++ module

2013-07-03 Thread Bert Belder
You need to include in all your .cpp files before requiring anything else. node.h picks up that BUILDING_NODE_EXTENSION is defined and sets up other libraries (like v8 and libuv) to link dynamically. - Bert On Wednesday, July 3, 2013 3:28:08 PM UTC+2, Alex Netkachov wrote: > > I'm working on