Hexagon / node-telldus

Node bindings for telldus-core
Other
34 stars 10 forks source link

Unable to install on Windows #73

Open dagalufh opened 8 years ago

dagalufh commented 8 years ago

Hi

I'm unable to install telldus on Windows. I've tried with both Visual Studio 2013 Express and Visual Studio Community 2015.

The error i'm receiving is this: `

telldus@1.1.0 install E:\TestTellstick\node_modules\telldus node-gyp configure build E:\TestTellstick\node_modules\telldus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node configure build ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. telldus.cc ..\telldus.cc(166): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(216): error C3861: 'strftime': identifier not found [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(216): error C3861: 'localtime': identifier not found [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(350): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(892): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(893): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(894): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(926): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(927): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] ..\telldus.cc(928): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data [E:\TestTellstick\node_modules\telldus\build\telldus.vcxproj] `

Do you know of any way to get around this? OS is Windows 10, x64 with Node.JS version 0.12.7, npm -v shows: 2.11.3

Hexagon commented 8 years ago

Unfortunately i can not help you with that, has only tested it on Linux myself.

Maybe you can pick up some pointers from https://github.com/Hexagon/node-telldus/issues/61 ?

dagalufh commented 8 years ago

Already tried that, went on and looked at node-ffi and have made it working that way. Thanks anyway, your tool looks great.

Hexagon commented 8 years ago

Good to hear :+1:

robertcarlens commented 8 years ago

Had similar errors on Windows 8.1 but finally managed to build it from the source by first adding two modifications.

Maybe this can help someone.

OS Windows 8.1, x64 with Node 0.12.4 and Visual Studio 2015 installed,

fgeorgsson commented 7 years ago

Tried to install node-red-contrib-tellstick today but got stuck on this problem as well in node-telldus which is a dependency. Could robertcarlens fix be added to the project so that windows users do not have to monkey-patch the project?

The library-dirs part is already correct, no fix needed. Still need to add this line to top of telldus.cc though: #include <time.h>

niklaspettersson commented 7 years ago

@robertcarlens THANKS! your instructions mady my day. And @pcguru I suspect it depends on OS and version of tellduscenter. Im on windows 7 64 bit and I had to add the path down to the c:\Program Files (x86)\Telldus\Development\x86_64

Without id it did not work and with it it works. (I also had to add time.h btw) Thanks @Hexagon for writing this module!

Hexagon commented 7 years ago

Great work pinpointing the problems. Hopefully fixed in 1.1.1 by 712e77969a52d3805cd40392e9717e64bb19c38d and 5f127ca9312ce1c0f58049050238b4e952ef831c.

Please reopen if very similar issues reoccur. New issue for new issues :)

Hexagon commented 7 years ago

Reopening this myself, as i noticed issue https://github.com/Hexagon/node-telldus/issues/61.

Is the documentation lacking information as it is now? Any ideas on improvement?

@pcguru @niklaspettersson