fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
179 stars 42 forks source link

Add 'type': 'static_library' to allow compiling properly on windows #29

Closed tlvenn closed 10 years ago

tlvenn commented 10 years ago

By default (WIndows 8.1, VS 2012). gyp is trying to build a dll (shared lib) instead of a static lib (.lib) and it simply does not work. I have to edit the gyp file to add: 'type': 'static_library' so that gyp can compile properly protobuf.

Is it possible that in some env, it somehow default to static lib and in some other cases like mine, it tries to build a shared lib ? Shouldn't the gyp file enforce a static lib ?

tlvenn commented 10 years ago

Well actually, my node-protobuf package does not even work... Bindings.js is trying to locate a protobuf.node that simply does not exist...

tlvenn commented 10 years ago

Nevermind... Looks like changing Runtime Library (Config/C/Code Generation) from Multi-threaded DLL (/MD) to Multi Threaded (/MT) did the trick.