fuwaneko / node-protobuf

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

Unable to build on Windows 8.1 and VS 2013 #27

Closed anweiss closed 10 years ago

anweiss commented 10 years ago

Getting numerous errors when building on Windows 8.1 using Visual Studio 2013. Followed README steps to compile libprotobuf.lib but receive the following errors when executing npm install node-protobuf (errors below are a snippet of all errors shown in console):

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(337): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc [C:\Users\anweiss\Documents\Development\testthinky\node_modules\no
de-protobuf\build\protobuf.vcxproj]
..\protobuf.cpp(34): error C2039: 'FunctionCallbackInfo' : is not a member of 'v8' [C:\Users\anweiss\Documents\Developm
ent\testthinky\node_modules\node-protobuf\build\protobuf.vcxproj]
..\protobuf.cpp(34): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\User
s\anweiss\Documents\Development\testthinky\node_modules\node-protobuf\build\protobuf.vcxproj]
..\protobuf.cpp(34): error C2143: syntax error : missing ',' before '<' 
fuwaneko commented 10 years ago

In short: I do not guarantee support for VS 2012+, Node.js itself is built with 2010 and node-gyp supports 2012 max. Also, currently there is no support for Node.js 0.11/0.12. Closer to 0.12 release I will update the code to support it.

anweiss commented 10 years ago

Thanks @fuwaneko . I'm currently using the latest stable version of Node, 0.10.26. I'll compile using VS 2012 rather than 2013.

fuwaneko commented 10 years ago

@anweiss let me know if you see any other issues.

anweiss commented 10 years ago

Thanks. I ended up re-compiling the latest libprotobuf source from trunk (https://code.google.com/p/protobuf/source/browse/#svn%2Ftrunk) and then installing node-protobuf using the following command: npm install https://github.com/fuwaneko/node-protobuf/archive/v1.0.12.tar.gz --msvs_version=2012

I noticed that your npm directory listing is only tagged for v1.0.10 (https://www.npmjs.org/package/node-protobuf) which doesn't seem to successfully build using libprotobuf compiled using VS2012. By forcing npm to install using the v1.0.12 .tar.gz package, I was able to install it successfully.

fuwaneko commented 10 years ago

@anweiss this is kinda strange, npmjs should contain 12. Thanks for the info, I'll fix it as soon as I can.