OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 915 forks source link

Compiler errors. #1807

Closed kdschlosser closed 5 years ago

kdschlosser commented 5 years ago

OK folks. I have one for ya.

I am trying to compile the current code in the master branch and I am encountering compiler errors.

This is the setup. openzwave is being compiled from inside python. I updated the windows build portion of the library. the code has been added to python_openzwave it will be in the next release. The build system works fine with the previous release of openzwave.

BUILD ENVIRONMENT

Machine architecture: x64
Build architecture: x86

== Windows SDK ================================================
   version:     10.0.17763.0
   sdk version: 10.0.17763.0\
   path:        C:\Program Files (x86)\Windows Kits\10

   -- Universal CRT -------------------------------------------
      path: C:\Program Files (x86)\Windows Kits\10\
   -- ATLMFC --------------------------------------------------
      path:         C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\ATLMFC
      include path: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\ATLMFC\include
      lib path:     C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x86

== Extension SDK ==============================================
   path: C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs

== TypeScript =================================================
   path: None

== HTML Help ==================================================
   path: C:\Program Files (x86)\HTML Help Workshop

== .NET =======================================================
   version:    v4.0.30319

   -- x86 -----------------------------------------------------
      version: v4.0.30319
      path:    C:\Windows\Microsoft.NET\Framework
   -- x64 -----------------------------------------------------
      version: v4.0.30319
      path:    C:\Windows\Microsoft.NET\Framework64
   -- NETFX ---------------------------------------------------
      path:         C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\
      x86 exe path: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\
      x64 exe path: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64

== Visual C ===================================================
   version: 14.0
   path:    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC

   -- Tools ---------------------------------------------------
      version:     14.16.27023
      path:        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023
      redist path: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012
   -- F# ------------------------------------------------------
      path: None
   -- DLL -----------------------------------------------------
      version: v140-14.16.27012.6
      path:    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.16.27012\x86\Microsoft.VC141.CRT

== MSBuild ====================================================
   version: 14.0
   path:    C:\Program Files (x86)\MSBuild\14.0\bin

== Python =====================================================
  version: 2.7.15.final.0
  architecture: x86
  library: Python27.lib
  libs: ['c:\\stackless27\\libs']
  includes: [
    'c:\\stackless27\\include',
    'c:\\stackless27\\include\\Stackless',
    'c:\\stackless27\\include\\Stackless\\core',
    'c:\\stackless27\\include\\Stackless\\module',
    'c:\\stackless27\\include\\Stackless\\pickling',
    'c:\\stackless27\\include\\Stackless\\platf'
]

COMPILER ARGUMENTS

{
    "libraries": [
        "setupapi",
        "python27"
    ],
    "extra_link_args": [
        "/IGNORE:4098",
        "/MACHINE:X86",
        "/NOLOGO",
        "/SUBSYSTEM:WINDOWS"
    ],
    "extra_compile_args": [
        "/Gy",
        "/O2",
        "/Gd",
        "/Oy",
        "/Oi",
        "/Fd\"C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\build\\lib_build\\OpenZWave.pdb\"",
        "/fp:precise",
        "/Zc:wchar_t",
        "/Zc:forScope",
        "/EHsc",
        "/wd4251",
        "/wd4244",
        "/wd4101",
        "/wd4267",
        "/wd4996",
        "/wd4351",
        "/FS",
        "/Zc:inline"
    ],
    "define_macros": [
        ["WIN32", 1],
        ["_MBCS", 1],
        ["_LIB",  1],
        ["USE_HID", 1],
        ["_MT", 1],
        ["_DLL", 1],
        ["OPENZWAVE_MAKEDLL", 1],
        ["NDEBUG", 1]
    ],
    "sources": [
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\build\\windows\\winversion.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\dllmain.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\hidapi\\windows\\hid.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\aes\\aescrypt.c",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\aes\\aeskey.c",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\aes\\aestab.c",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\aes\\aes_modes.c",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Bitfield.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Alarm.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ApplicationStatus.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Association.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\AssociationCommandConfiguration.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\BarrierOperator.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Basic.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\BasicWindowCovering.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Battery.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\CentralScene.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ClimateControlSchedule.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Clock.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Color.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\CommandClass.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\CommandClasses.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Configuration.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ControllerReplication.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\CRC16Encap.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\DeviceResetLocally.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\DoorLock.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\DoorLockLogging.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\EnergyProduction.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Hail.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Indicator.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Language.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Lock.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ManufacturerProprietary.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ManufacturerSpecific.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Meter.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\MeterPulse.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\MultiChannelAssociation.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\MultiCmd.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\MultiInstance.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\NodeNaming.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\NoOperation.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Powerlevel.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Proprietary.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Protection.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SceneActivation.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Security.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SensorAlarm.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SensorBinary.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SensorMultilevel.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SimpleAV.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SimpleAVCommandItem.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SoundSwitch.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SwitchAll.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SwitchBinary.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SwitchMultilevel.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SwitchToggleBinary.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\SwitchToggleMultilevel.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ThermostatFanMode.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ThermostatFanState.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ThermostatMode.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ThermostatOperatingState.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ThermostatSetpoint.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\TimeParameters.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\UserCode.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\Version.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\WakeUp.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\command_classes\\ZWavePlusInfo.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\CompatOptionManager.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\DNSThread.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Driver.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Group.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Http.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Localization.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Manager.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\ManufacturerSpecificDB.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Msg.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Node.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Notification.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\NotificationCCTypes.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Options.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Controller.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\DNS.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Event.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\FileOps.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\HidController.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\HttpClient.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Log.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Mutex.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\SerialController.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Stream.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Thread.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\TimeStamp.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\Wait.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\DNSImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\EventImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\FileOpsImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\LogImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\MutexImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\SerialControllerImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\ThreadImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\TimeStampImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\platform\\windows\\WaitImpl.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Scene.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\TimerThread.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\Utils.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\Value.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueBitSet.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueBool.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueButton.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueByte.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueDecimal.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueInt.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueList.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueRaw.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueSchedule.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueShort.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueStore.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\value_classes\\ValueString.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src\\ZWSecurity.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\tinyxml\\tinystr.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\tinyxml\\tinyxml.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\tinyxml\\tinyxmlerror.cpp",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\tinyxml\\tinyxmlparser.cpp"
    ],
    "library_dirs": [
        "c:\\stackless27\\libs"
    ],
    "include_dirs": [
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\src",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\tinyxml",
        "C:\\Users\\Administrator\\Documents\\GitHub\\python-openzwave\\openzwave\\cpp\\hidapi\\hidapi"
    ]
}

ERROR

C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(93): error C2665: 'std::ptr_fun': none of the 4 overloads could convert all the argument types
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: could be 'std::pointer_to_unary_function<int,int,int (__vectorcall *)(int)> std
:ptr_fun<int,int>(_Result (__vectorcall *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: or       'std::pointer_to_unary_function<int,int,int (__stdcall *)(int)> std::p
r_fun<int,int>(_Result (__stdcall *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: or       'std::pointer_to_unary_function<int,int,int (__fastcall *)(int)> std::
tr_fun<int,int>(_Result (__fastcall *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: or       'std::pointer_to_unary_function<int,int,int (__cdecl *)(int)> std::ptr
fun<int,int>(_Result (__cdecl *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(93): note: while trying to match the argument list '(overloaded-function)'
C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(92): error C2672: 'std::find_if': no matching overloaded function found
C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(93): error C2780: '_InIt std::find_if(_InIt,const _InIt,_Pr)': expects 3 arguments - 2 provided
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\algorithm(167): note: see declaration of 'std::find_if'
C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(99): error C2665: 'std::ptr_fun': none of the 4 overloads could convert all the argument types
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: could be 'std::pointer_to_unary_function<int,int,int (__vectorcall *)(int)> std
:ptr_fun<int,int>(_Result (__vectorcall *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: or       'std::pointer_to_unary_function<int,int,int (__stdcall *)(int)> std::p
r_fun<int,int>(_Result (__stdcall *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: or       'std::pointer_to_unary_function<int,int,int (__fastcall *)(int)> std::
tr_fun<int,int>(_Result (__fastcall *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\functional(576): note: or       'std::pointer_to_unary_function<int,int,int (__cdecl *)(int)> std::ptr
fun<int,int>(_Result (__cdecl *)(_Arg))'
with
[
_Result=int,
_Arg=int
]
C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(99): note: while trying to match the argument list '(overloaded-function)'
C:\Users\Administrator\Documents\GitHub\python-openzwave\openzwave\cpp\src\Utils.cpp(98): error C2672: 'std::find_if': no matching overloaded function found
compiling ValueStore.cpp...

The compiler hangs when compiling Utils.cpp. This error does not show until I perform a keyboard interrupt. then the compiler starts to move again spits out this error and of course the program exists because i did a keyboard interrupt.

The new build system for python_openzwave does not use the solution foles included with openzwave. instead I create an identical build environment that would be created if using visual studio or vcvarsall. I do this without using vcvarsall (it has issues). I then call cl.exe directly passing the compiler arguments outlined above.

If there is someone that is running a Windows box and has Visual Studio, Visual C, or the Visual Studio Build Tools and is willing to test to make sure that the problem is not isolated to only my machine. That would be a HUGE help.

To do that you need to download the 0.5.x branch and run python setup.py build --flavor=dev the program should take care of everything.

kdschlosser commented 5 years ago

never mind.. after trying to figure this out for the past 3 hours. only when i finally post an issue do i find the issue and fix it..

sorry folks!

Fishwaldo commented 5 years ago

You can always check http://bamboo.my-ho.st/bamboo/browse/OZW-OZWLNX when you have compile issues.

As you can see we have a compile failure on older versions of VS right now. I need to investigate and fix that.

kdschlosser commented 5 years ago

I am having a booger of a time with one thing. and it doesn't make any sense. I am getting the error below even tho I do have an overloaded method declared. It beats the hell out of me why it's doing that.

Error compiling Cython file:
------------------------------------------------------------
...
                cret = self.manager.SetValueListSelection(values_map.at(id), type_string)
                logger.debug("SetValueListSelection %s", cret)
                ret = 1 if cret else 0
            elif datatype == "BitSet":
                type_bool = value
                cret = self.manager.SetValue(values_map.at(id), pos, type_bool)
                                           ^
------------------------------------------------------------
Fishwaldo commented 5 years ago

What is type_bool from the compiler perspective? It’s probably not sure if it’s a integer or ???

You could wrap it in a static_cast(value) when passing it to the SetValue call so the compiler is sure it’s a bool value.

Or do something like if Val = python_true ? true : false in the setvalue call if it can’t be cast.

kdschlosser commented 5 years ago

ok so this code is Cython code. Cython code = C++ code and python code smashed into a single language.

It is similar to C++ code in terms of the verbage and having to declare variable types. the syntax and statements are python. there needs to be a header file of sorts in Cython where you declare classes methods and class variables.

there are some datatypes that would need to be cast into a python version of it. and some that really do not.

bool is not one of the types that needs to be cast. and int in python pretty much covers all of your uint* and int* data types. as well as ushort* and short* there is more then that. but to keep it simple we will leave it there. There is only checking does for min/max when converting from python to C++ and nothing is done when passing from C++ to python. I believe that is how it works. I have not dove into it. But from my work with PyWinAPI and porting the Windows SDK to python this is what I have come up with. I doubt it is going to be much different because of Cython.

you have a "header" file of corts as well as the source file. very similiar to what is done in C++

file extensions header = .pyd source = .pyx

This code is from the "header" (.pxd) file Cython does allow for overloading. You can see that done for SetValue. and you can also see the declaring of the overload SetValue(value id, pos, value) for the BitSet value type.

cdef extern from "Manager.h" namespace "OpenZWave":

    cdef cppclass Manager:
        # // Destructor
        void Destroy()
        # // Configuration
        # deprecated void WriteConfig(uint32_t homeid)
        Options* GetOptions()
        # // Drivers
        bool AddDriver(string serialport)
        bool RemoveDriver(string controllerPath)
        uint8_t GetControllerNodeId(uint32_t homeid)
        uint8_t GetSUCNodeId(uint32_t homeid)
        bool IsPrimaryController(uint32_t homeid)
        bool IsStaticUpdateController(uint32_t homeid)
        bool IsBridgeController(uint32_t homeid)
        string getVersionAsString()
        string getVersionLongAsString()
        string GetLibraryVersion(uint32_t homeid)
        string GetLibraryTypeName(uint32_t homeid)
        int32_t GetSendQueueCount( uint32_t homeId )
        void LogDriverStatistics( uint32_t homeId )
        void GetDriverStatistics( uint32_t homeId, DriverData* data )
        void GetNodeStatistics( uint32_t homeId, uint8_t nodeid, NodeData* data )
        ControllerInterface GetControllerInterfaceType( uint32_t homeId )
        string GetControllerPath( uint32_t homeId )
        # // Network
        void TestNetworkNode( uint32_t homeId, uint8_t nodeId, uint32_t count )
        void TestNetwork( uint32_t homeId, uint32_t count )
        void HealNetworkNode( uint32_t homeId, uint32_t nodeId, bool _doRR )
        void HealNetwork( uint32_t homeId, bool doRR)
        # // Polling
        uint32_t GetPollInterval()
        void SetPollInterval(uint32_t milliseconds, bIntervalBetweenPolls)
        bool EnablePoll(ValueID& valueId, uint8_t intensity)
        bool DisablePoll(ValueID& valueId)
        bool isPolled(ValueID& valueId)
        void SetPollIntensity( ValueID& valueId, uint8_t intensity)
        uint8_t GetPollIntensity(ValueID& valueId)
        # // Node Information
        bool RefreshNodeInfo(uint32_t homeid, uint8_t nodeid)
        bool RequestNodeState(uint32_t homeid, uint8_t nodeid)
        bool RequestNodeDynamic( uint32_t homeId, uint8_t nodeId )
        bool IsNodeListeningDevice(uint32_t homeid, uint8_t nodeid)
        bool IsNodeFrequentListeningDevice( uint32_t homeId, uint8_t nodeId )
        bool IsNodeBeamingDevice( uint32_t homeId, uint8_t nodeId )
        bool IsNodeRoutingDevice(uint32_t homeid, uint8_t nodeid)
        bool IsNodeSecurityDevice( uint32_t homeId, uint8_t nodeId )
        bool IsNodeZWavePlus( uint32_t homeId, uint8_t nodeId )
        uint32_t GetNodeMaxBaudRate(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeVersion(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeSecurity(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeBasic(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeGeneric(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeSpecific(uint32_t homeid, uint8_t nodeid)
        string GetNodeType(uint32_t homeid, uint8_t nodeid)
        uint16_t GetNodeDeviceType(uint32_t homeid, uint8_t nodeid)
        string GetNodeDeviceTypeString(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeRole(uint32_t homeid, uint8_t nodeid)
        string GetNodeRoleString(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodePlusType(uint32_t homeid, uint8_t nodeid)
        string GetNodePlusTypeString(uint32_t homeid, uint8_t nodeid)
        uint32_t GetNodeNeighbors(uint32_t homeid, uint8_t nodeid, uint8_t** nodeNeighbors)
        string GetNodeManufacturerName(uint32_t homeid, uint8_t nodeid)
        string GetNodeProductName(uint32_t homeid, uint8_t nodeid)
        string GetNodeName(uint32_t homeid, uint8_t nodeid)
        string GetNodeLocation(uint32_t homeid, uint8_t nodeid)
        string GetNodeManufacturerId(uint32_t homeid, uint8_t nodeid)
        string GetNodeProductType(uint32_t homeid, uint8_t nodeid)
        string GetNodeProductId(uint32_t homeid, uint8_t nodeid)
        void SetNodeManufacturerName(uint32_t homeid, uint8_t nodeid, string manufacturerName)
        void SetNodeProductName(uint32_t homeid, uint8_t nodeid, string productName)
        void SetNodeName(uint32_t homeid, uint8_t nodeid, string productName)
        void SetNodeLocation(uint32_t homeid, uint8_t nodeid, string location)
        # deprecated void SetNodeOn(uint32_t homeid, uint8_t nodeid)
        # deprecated void SetNodeOff(uint32_t homeid, uint8_t nodeid)
        # deprecated void SetNodeLevel(uint32_t homeid, uint8_t nodeid, uint8_t level)
        bool IsMultiInstance(uint32_t homeid, uint8_t nodeid)
        bool IsNodeInfoReceived(uint32_t homeid, uint8_t nodeid)
        bool IsNodePlusInfoReceived(uint32_t homeid, uint8_t nodeid)
        bool GetNodeClassInformation( uint32_t homeId, uint8_t nodeId, uint8_t commandClassId,
                          string *className, uint8_t *classVersion)
        bool IsNodeAwake(uint32_t homeid, uint8_t nodeid)
        bool IsNodeFailed(uint32_t homeid, uint8_t nodeid)
        string GetNodeQueryStage(uint32_t homeid, uint8_t nodeid)
        uint8_t GetNodeIcon(uint32_t homeid, uint8_t nodeid)
        string GetNodeIconName(uint32_t homeid, uint8_t nodeid)
        # // Values
        string GetValueLabel(ValueID& valueid)
        void SetValueLabel(ValueID& valueid, string value)
        string GetValueUnits(ValueID& valueid)
        void SetValueUnits(ValueID& valueid, string value)
        string GetValueHelp(ValueID& valueid)
        void SetValueHelp(ValueID& valueid, string value)
        uint32_t GetValueMin(ValueID& valueid)
        uint32_t GetValueMax(ValueID& valueid)
        bool IsValueReadOnly(ValueID& valueid)
        bool IsValueWriteOnly(ValueID& valueid)
        bool IsValueSet(ValueID& valueid)
        bool IsValuePolled( ValueID& valueid )
        bool GetValueAsBitSet(ValueID& valueid, uint8_t _pos, bool* o_value)
        bool GetValueAsBool(ValueID& valueid, bool* o_value)
        bool GetValueAsByte(ValueID& valueid, uint8_t* o_value)
        bool GetValueAsFloat(ValueID& valueid, float* o_value)
        bool GetValueAsInt(ValueID& valueid, int32_t* o_value)
        bool GetValueAsShort(ValueID& valueid, int16_t* o_value)
        bool GetValueAsRaw(ValueID& valueid, uint8_t** o_value, uint8_t* o_length )
        bool GetValueAsString(ValueID& valueid, string* o_value)
        bool GetValueListSelection(ValueID& valueid, string* o_value)
        bool GetValueListSelection(ValueID& valueid, int32_t* o_value)
        bool GetValueListItems(ValueID& valueid, vector[string]* o_value)
        bool GetValueListValues(ValueID& valueid, vector[int32_t]* o_value)
        bool SetValue(ValueID& valueid, bool value)
        bool SetValue(ValueID& valueid, uint8_t value)
        bool SetValue(ValueID& valueid, float value)
        bool SetValue(ValueID& valueid, int32_t value)
        bool SetValue(ValueID& valueid, int16_t value)
        bool SetValue(ValueID& valueid, uint8_t* value, uint8_t length)
        bool SetValue(ValueID& valueid, uint8_t pos, bool value)
        bool SetValue(ValueID& valueid, string value)
        bool SetValueListSelection(ValueID& valueid, string selecteditem)
        bool RefreshValue(ValueID& valueid)
        void SetChangeVerified(ValueID& valueid, bool verify)
        bool GetChangeVerified(ValueID& valueid)
        bool PressButton(ValueID& valueid)
        bool ReleaseButton(ValueID& valueid)
        bool GetValueFloatPrecision(ValueID& valueid, uint8_t* o_value)
        # // Climate Control
        uint8_t GetNumSwitchPoints(ValueID& valueid)
        bool SetSwitchPoint(ValueID& valueid, uint8_t hours, uint8_t minutes, uint8_t setback)
        bool RemoveSwitchPoint(ValueID& valueid, uint8_t hours, uint8_t minutes)
        bool ClearSwitchPoints(ValueID& valueid)
        bool GetSwitchPoint(ValueID& valueid, uint8_t idx, uint8_t* o_hours, uint8_t* o_minutes, int8_t* o_setback)
        # // SwitchAll
        # deprecated void SwitchAllOn(uint32_t homeid)
        # deprecated void SwitchAllOff(uint32_t homeid)
        # // Configuration Parameters
        bool SetConfigParam(uint32_t homeid, uint8_t nodeid, uint8_t param, uint32_t value, uint8_t size)
        void RequestConfigParam(uint32_t homeid, uint8_t nodeid, uint8_t aram)
        void RequestAllConfigParams(uint32_t homeid, uint8_t nodeid)
        # // Groups
        uint8_t GetNumGroups(uint32_t homeid, uint8_t nodeid)
        uint32_t GetAssociations(uint32_t homeid, uint8_t nodeid, uint8_t groupidx, struct_associations o_associations)
#~ cython overloading problem
#~ src-lib/libopenzwave/libopenzwave.pyx:3739:58: no suitable method found
#~         uint32_t GetAssociations(uint32_t homeid, uint8_t nodeid, uint8_t groupidx, int_associations o_associations)
        uint8_t GetMaxAssociations(uint32_t homeid, uint8_t nodeid, uint8_t groupidx)
        string GetGroupLabel(uint32_t homeid, uint8_t nodeid, uint8_t groupidx)
        void AddAssociation(uint32_t homeid, uint8_t nodeid, uint8_t groupidx, uint8_t targetnodeid, uint8_t instance)
        void RemoveAssociation(uint32_t homeid, uint8_t nodeid, uint8_t groupidx, uint8_t targetnodeid, uint8_t instance)
        bool AddWatcher(pfnOnNotification_t notification, void* context)
        bool RemoveWatcher(pfnOnNotification_t notification, void* context)
        # void NotifyWatchers(Notification*)
        # // Controller Commands
        void ResetController(uint32_t homeid)
        void SoftReset(uint32_t homeid)
        #Deprecated
        bool BeginControllerCommand(uint32_t homeid, ControllerCommand _command, pfnControllerCallback_t _callback, void* _context, bool _highPower, uint8_t _nodeId, uint8_t _arg )
        bool CancelControllerCommand(uint32_t homeid)
        bool AddNode(uint32_t homeid, bool _doSecurity)

        bool RemoveNode(uint32_t homeid)
        bool RemoveFailedNode(uint32_t homeid, uint8_t nodeid)
        bool HasNodeFailed(uint32_t homeid, uint8_t nodeid)
        bool ReplaceFailedNode(uint32_t homeid, uint8_t nodeid)
        bool AssignReturnRoute(uint32_t homeid, uint8_t nodeid)
        bool RequestNodeNeighborUpdate(uint32_t homeid, uint8_t nodeid)
        bool RequestNetworkUpdate(uint32_t homeid, uint8_t nodeid)
        bool ReplicationSend(uint32_t homeid, uint8_t nodeid)
        bool DeleteAllReturnRoutes(uint32_t homeid, uint8_t nodeid)
        bool SendNodeInformation(uint32_t homeid, uint8_t nodeid)
        bool CreateNewPrimary(uint32_t homeid)
        bool TransferPrimaryRole(uint32_t homeid)
        bool ReceiveConfiguration(uint32_t homeid)
        bool CreateButton(uint32_t homeid, uint8_t nodeid, uint8_t buttonid)
        bool DeleteButton(uint32_t homeid, uint8_t nodeid, uint8_t buttonid)

so now in the .pyx file you are going to see more code that looks like python then in the .pyd file which is closer to C++ code. because the code in the .pyx is closer to python we cannot declare overloaded methods. these methods are what is directly accessed by the importing module. which is going to be python. so it has to be compatible with python. call this the go between. the middle man. it does all of the needed type changes and evaluation of the data being bapped to it to be able to determine the proper call that needs to be made. It is almost the same as what I had outlined with being able to compile openzwave as a python module. except what this method does would be coded in C code. this is just flipped.

here is the code from the .pyx file it is the serValue method that is accessed from python_openzwave. because the creation of overloaded methods cannot be made we have to add any and all parameters that may be used to the method. and supply them with default values.

I added the code so it is no different then what is already there. i just tacked on the additional code to the bottom. This is why I do not know why it is not working. But you will see what I am talking about with some data types needing conversion and others do not.

def setValue(self, id, value, pos=0):
        '''
.. _setValue:

Sets the value of a device valueid.
Due to the possibility of a device being asleep, the command is assumed to suceeed, and the value
held by the node is updated directly.  This will be reverted by a future status message from the device
if the Z-Wave message actually failed to get through.  Notification callbacks will be sent in both cases.

:param id: The ID of a value.
:type id: int
:param value: The value to set.
:type value: int
:return: An integer representing the result of the operation  0 : The C method fails, 1 : The C method succeed, 2 : Can't find id in the map
:rtype: int

        '''
        cdef float type_float
        cdef bool type_bool
        cdef uint8_t type_byte
        cdef int32_t type_int
        cdef int16_t type_short
        cdef string type_string
        cdef uint8_t* type_raw
        ret = 2
        if values_map.find(id) != values_map.end():
            datatype = PyValueTypes[values_map.at(id).GetType()]
            if datatype == "Bool":
                type_bool = value
                cret = self.manager.SetValue(values_map.at(id), type_bool)
                ret = 1 if cret else 0
            elif datatype == "Byte":
                type_byte = value
                cret = self.manager.SetValue(values_map.at(id), type_byte)
                ret = 1 if cret else 0
            elif datatype == "Raw":
                type_raw = <uint8_t*> malloc(len(value)*sizeof(uint8_t))
                for x in range(0, len(value)):
                    #print value[x]
                    type_raw[x] = ord(value[x])
                cret = self.manager.SetValue(values_map.at(id), type_raw, len(value))
                ret = 1 if cret else 0
                free(type_raw)
            elif datatype == "Decimal":
                type_float = value
                cret = self.manager.SetValue(values_map.at(id), type_float)
                ret = 1 if cret else 0
            elif datatype == "Int":
                type_int = value
                cret = self.manager.SetValue(values_map.at(id), type_int)
                ret = 1 if cret else 0
            elif datatype == "Short":
                type_short = value
                cret = self.manager.SetValue(values_map.at(id), type_short)
                ret = 1 if cret else 0
            elif datatype == "String":
                if six.PY3:
                    type_string = str_to_cppstr(value)
                else:
                    type_string = str_to_cppstr(string(value))
                cret = self.manager.SetValue(values_map.at(id), type_string)
                ret = 1 if cret else 0
            elif datatype == "Button":
                type_bool = value
                cret = self.manager.SetValue(values_map.at(id), type_bool)
                ret = 1 if cret else 0
            elif datatype == "List":
                logger.debug("SetValueListSelection %s", value)
                if six.PY3:
                    type_string = str_to_cppstr(value)
                else:
                    type_string = str_to_cppstr(string(value))
                cret = self.manager.SetValueListSelection(values_map.at(id), type_string)
                logger.debug("SetValueListSelection %s", cret)
                ret = 1 if cret else 0
            elif datatype == "BitSet":
                type_bool = value
                cret = self.manager.SetValue(values_map.at(id), pos, type_bool)
                ret = 1 if cret else 0

        return ret
kdschlosser commented 5 years ago

never mind. I now see what the problem is.. HOLY COW!!!

I am such a dum dum i need to cast the pos into a uint8_t and i am not doing that. OYE VAE!

well this is what helped me to figure it out. sometimes it is just explaining it that will make the problem reveal it's self.